From ed98157fc2ec37fa5e9799193fb68ec80c056ed0 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Tue, 5 Mar 2024 09:12:16 +0100 Subject: [PATCH] rm constant --- GUI/View/Layout/mainwindow_constants.h | 2 -- GUI/View/Manager/ProjectManager.cpp | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/GUI/View/Layout/mainwindow_constants.h b/GUI/View/Layout/mainwindow_constants.h index 9976a162473..6c5f2d8dfab 100644 --- a/GUI/View/Layout/mainwindow_constants.h +++ b/GUI/View/Layout/mainwindow_constants.h @@ -44,8 +44,6 @@ const char S_SAMPLE_3DVIEW_WIDGET_SIZE[] = "size"; const char S_PARAMETER_TUNING_WIDGET_COLUMN_WIDTH[] = "width"; const char S_INSTRUMENT_LIBRARY_EDITOR_TREE_WIDTH[] = "width"; -const int MAX_RECENT_PROJECTS = 10; - // Hints const unsigned int FIT_ACTIVITY_PANEL_WIDTH = 480; diff --git a/GUI/View/Manager/ProjectManager.cpp b/GUI/View/Manager/ProjectManager.cpp index c3b49041e2e..dfb93cfdb1a 100644 --- a/GUI/View/Manager/ProjectManager.cpp +++ b/GUI/View/Manager/ProjectManager.cpp @@ -18,7 +18,6 @@ #include "GUI/Model/Project/ProjectUtil.h" #include "GUI/View/Info/MessageBox.h" #include "GUI/View/Layout/ApplicationSettings.h" -#include "GUI/View/Layout/mainwindow_constants.h" #include "GUI/View/Manager/AutosaveController.h" #include "GUI/View/Manager/NewProjectDialog.h" #include "GUI/View/Manager/ProjectLoadProblemDialog.h" @@ -324,7 +323,7 @@ void ProjectManager::addToRecentProjects() QString fname = gDoc->projectFullPath(); m_recent_projects.removeAll(fname); m_recent_projects.prepend(fname); - while (m_recent_projects.size() > GUI::Style::MAX_RECENT_PROJECTS) + while (m_recent_projects.size() > 10) m_recent_projects.removeLast(); emit recentListModified(); -- GitLab