Loading isis/src/qisis/apps/ipce/IpceMainWindow.cpp +56 −28 Original line number Diff line number Diff line Loading @@ -164,14 +164,14 @@ namespace Isis { statusBar()->addWidget(progressBar); } // Read default app settings. NOTE: This must be completed before initializing actions in order // to read the recent projects from the config file. readSettings(m_directory->project() ); initializeActions(); createMenus(); createToolBars(); // setTabbedViewMode(); // centralWidget->setTabsMovable(true); // centralWidget->setTabsClosable(true); // Read default app settings readSettings(m_directory->project() ); Loading Loading @@ -730,8 +730,27 @@ namespace Isis { settings.endGroup(); QStringList projectPathReverseList; // General settings if (project->name() == "Project") { setWindowTitle("ipce"); QStringList projectNameList; QStringList projectPathList; settings.beginGroup("recent_projects"); QStringList keys = settings.allKeys(); QRegExp underscore("%%%%%"); foreach (QString key, keys) { QString childKey = "recent_projects/"+key; QString projectPath = settings.value(key).toString(); QString projectName = projectPath.split("/").last(); projectPathList.append(projectPath) ; projectNameList.append(projectName); } settings.endGroup(); QStringList projectPathReverseList; for (int i = projectPathList.count()-1;i>=0;i--) { projectPathReverseList.append(projectPathList[i]); } Loading @@ -749,19 +768,28 @@ namespace Isis { break; } m_directory->setRecentProjectsList(projectPathListTruncated); m_directory->updateRecentProjects(); m_maxThreadCount = settings.value("maxThreadCount", m_maxThreadCount).toInt(); applyMaxThreadCount(); } // Project specific settings else { setWindowTitle( project->name() ); if (settings.contains("geometry")) { setGeometry(settings.value("geometry").value<QRect>()); } if (settings.contains("windowState")) { restoreState(settings.value("windowState").toByteArray()); } // The geom/state isn't enough for main windows to correctly remember // their position and size, so let's restore those on top of // the geom and state. if (!settings.value("pos").toPoint().isNull()) if (!settings.value("pos").toPoint().isNull()) { move(settings.value("pos").toPoint()); m_maxThreadCount = settings.value("maxThreadCount", m_maxThreadCount).toInt(); applyMaxThreadCount(); } } } Loading Loading @@ -791,7 +819,7 @@ namespace Isis { m_directory->project()->save(); } } //writeSettings(m_directory->project()); writeSettings(m_directory->project()); m_directory->project()->clear(); QMainWindow::closeEvent(event); Loading isis/src/qisis/apps/ipce/IpceMainWindow.h +3 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,9 @@ namespace Isis { * @history 2018-06-14 Makayla Shepherd - Stopped saving the state of a temporary project. * @history 2018-06-14 Makayla Shepherd - Save and Save As now save the geometry and state of * the project. * @history 2018-06-15 Tracie Sucharski - Fixed break to recent projects. The readSettings * must be called before initializeActions to get the recent projects * from the config file. * */ class IpceMainWindow : public QMainWindow { Loading Loading
isis/src/qisis/apps/ipce/IpceMainWindow.cpp +56 −28 Original line number Diff line number Diff line Loading @@ -164,14 +164,14 @@ namespace Isis { statusBar()->addWidget(progressBar); } // Read default app settings. NOTE: This must be completed before initializing actions in order // to read the recent projects from the config file. readSettings(m_directory->project() ); initializeActions(); createMenus(); createToolBars(); // setTabbedViewMode(); // centralWidget->setTabsMovable(true); // centralWidget->setTabsClosable(true); // Read default app settings readSettings(m_directory->project() ); Loading Loading @@ -730,8 +730,27 @@ namespace Isis { settings.endGroup(); QStringList projectPathReverseList; // General settings if (project->name() == "Project") { setWindowTitle("ipce"); QStringList projectNameList; QStringList projectPathList; settings.beginGroup("recent_projects"); QStringList keys = settings.allKeys(); QRegExp underscore("%%%%%"); foreach (QString key, keys) { QString childKey = "recent_projects/"+key; QString projectPath = settings.value(key).toString(); QString projectName = projectPath.split("/").last(); projectPathList.append(projectPath) ; projectNameList.append(projectName); } settings.endGroup(); QStringList projectPathReverseList; for (int i = projectPathList.count()-1;i>=0;i--) { projectPathReverseList.append(projectPathList[i]); } Loading @@ -749,19 +768,28 @@ namespace Isis { break; } m_directory->setRecentProjectsList(projectPathListTruncated); m_directory->updateRecentProjects(); m_maxThreadCount = settings.value("maxThreadCount", m_maxThreadCount).toInt(); applyMaxThreadCount(); } // Project specific settings else { setWindowTitle( project->name() ); if (settings.contains("geometry")) { setGeometry(settings.value("geometry").value<QRect>()); } if (settings.contains("windowState")) { restoreState(settings.value("windowState").toByteArray()); } // The geom/state isn't enough for main windows to correctly remember // their position and size, so let's restore those on top of // the geom and state. if (!settings.value("pos").toPoint().isNull()) if (!settings.value("pos").toPoint().isNull()) { move(settings.value("pos").toPoint()); m_maxThreadCount = settings.value("maxThreadCount", m_maxThreadCount).toInt(); applyMaxThreadCount(); } } } Loading Loading @@ -791,7 +819,7 @@ namespace Isis { m_directory->project()->save(); } } //writeSettings(m_directory->project()); writeSettings(m_directory->project()); m_directory->project()->clear(); QMainWindow::closeEvent(event); Loading
isis/src/qisis/apps/ipce/IpceMainWindow.h +3 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,9 @@ namespace Isis { * @history 2018-06-14 Makayla Shepherd - Stopped saving the state of a temporary project. * @history 2018-06-14 Makayla Shepherd - Save and Save As now save the geometry and state of * the project. * @history 2018-06-15 Tracie Sucharski - Fixed break to recent projects. The readSettings * must be called before initializeActions to get the recent projects * from the config file. * */ class IpceMainWindow : public QMainWindow { Loading