diff --git a/Settings.h b/Settings.h index 2a1158a..b82dffb 100644 --- a/Settings.h +++ b/Settings.h @@ -84,12 +84,14 @@ struct History bool front_is_valid; bool load_at_start; bool save_on_exit; + bool changed; History() { path = IMGUI_LABEL_RECENT_FILES; front_is_valid = false; load_at_start = false; save_on_exit = false; + changed = false; } void push(const std::string &filename) { if (filename.empty()) { @@ -101,6 +103,7 @@ struct History if (filenames.size() > MAX_RECENT_HISTORY) filenames.pop_back(); front_is_valid = true; + changed = true; } void remove(const std::string &filename) { if (filename.empty()) @@ -108,6 +111,7 @@ struct History if (filenames.front() == filename) front_is_valid = false; filenames.remove(filename); + changed = true; } }; diff --git a/UserInterfaceManager.cpp b/UserInterfaceManager.cpp index 448c6bf..7c04a3c 100644 --- a/UserInterfaceManager.cpp +++ b/UserInterfaceManager.cpp @@ -2771,12 +2771,13 @@ void Navigator::RenderMainPannel() // fill the session list depending on the mode static std::list sessions_list; // change session list if changed - if (selection_session_mode_changed) { + if (selection_session_mode_changed || Settings::application.recentSessions.changed) { // selection MODE 0 ; RECENT sessions if ( selection_session_mode == 0) { // show list of recent sessions sessions_list = Settings::application.recentSessions.filenames; + Settings::application.recentSessions.changed = false; } // selection MODE 1 : LIST FOLDER else if ( selection_session_mode == 1) {