From 3ff193f42d2e1ec072ab3c83e2c886e8b67af2c6 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Wed, 12 Apr 2023 20:00:19 +0200 Subject: [PATCH] Restore on start; open session and view settings, or start fresh --- src/Mixer.cpp | 14 ++++++++------ src/UserInterfaceManager.cpp | 4 ++-- src/UserInterfaceManager.h | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Mixer.cpp b/src/Mixer.cpp index 6024929..88a4821 100644 --- a/src/Mixer.cpp +++ b/src/Mixer.cpp @@ -78,14 +78,16 @@ Mixer::Mixer() : session_(nullptr), back_session_(nullptr), sessionSwapRequested if ( Settings::application.recentSessions.load_at_start && Settings::application.recentSessions.front_is_valid && Settings::application.recentSessions.filenames.size() > 0 && - Settings::application.fresh_start) + Settings::application.fresh_start) { load( Settings::application.recentSessions.filenames.front() ); - else - // initializes with a new empty session + // initialize with the current view + setView( (View::Mode) Settings::application.current_view ); + } + else { + // initialize with a new empty session clear(); - - // this initializes with the current view - setView( (View::Mode) Settings::application.current_view ); + setView( View::MIXING ); + } } void Mixer::update() diff --git a/src/UserInterfaceManager.cpp b/src/UserInterfaceManager.cpp index 3d3966f..b84f1de 100644 --- a/src/UserInterfaceManager.cpp +++ b/src/UserInterfaceManager.cpp @@ -2682,7 +2682,7 @@ void SourceController::Render() // offer to open folder location ImVec2 draw_pos = ImGui::GetCursorPos(); ImGui::SetCursorPos(draw_pos + ImVec2(ImGui::GetContentRegionAvailWidth() - 1.2 * ImGui::GetTextLineHeightWithSpacing(), -ImGui::GetFrameHeight()) ); - if (ImGuiToolkit::IconButton( ICON_FA_EXTERNAL_LINK_ALT, Settings::application.source.capture_path.c_str())) + if (ImGuiToolkit::IconButton( ICON_FA_FOLDER_OPEN, Settings::application.source.capture_path.c_str())) SystemToolkit::open(Settings::application.source.capture_path); ImGui::SetCursorPos(draw_pos); @@ -4476,7 +4476,7 @@ void OutputPreview::Render() // offer to open folder location ImVec2 draw_pos = ImGui::GetCursorPos(); ImGui::SetCursorPos(draw_pos + ImVec2(ImGui::GetContentRegionAvailWidth() - 1.2 * ImGui::GetTextLineHeightWithSpacing(), -ImGui::GetFrameHeight()) ); - if (ImGuiToolkit::IconButton( ICON_FA_EXTERNAL_LINK_ALT, Settings::application.record.path.c_str())) + if (ImGuiToolkit::IconButton( ICON_FA_FOLDER_OPEN, Settings::application.record.path.c_str())) SystemToolkit::open(Settings::application.record.path); ImGui::SetCursorPos(draw_pos); diff --git a/src/UserInterfaceManager.h b/src/UserInterfaceManager.h index 3a8f83d..11811a0 100644 --- a/src/UserInterfaceManager.h +++ b/src/UserInterfaceManager.h @@ -42,7 +42,7 @@ #define SHORTCUT_SAVE_FILE CTRL_MOD "S" #define MENU_SAVEAS_FILE ICON_FA_FILE_DOWNLOAD " Save as" #define MENU_SAVE_ON_EXIT ICON_FA_LEVEL_DOWN_ALT " Save on exit" -#define MENU_OPEN_ON_START ICON_FA_LEVEL_UP_ALT " Open last on start" +#define MENU_OPEN_ON_START ICON_FA_LEVEL_UP_ALT " Restore on start" #define SHORTCUT_SAVEAS_FILE CTRL_MOD "Shift+S" #define SHORTCUT_LOGS CTRL_MOD "L" #define MENU_QUIT ICON_FA_POWER_OFF " Quit"