Loading isis/src/qisis/apps/ipce/IpceMainWindow.cpp +58 −56 Original line number Diff line number Diff line Loading @@ -164,13 +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(); // Read default app settings readSettings(m_directory->project() ); QStringList args = QCoreApplication::arguments(); if (args.count() == 2) { Loading Loading @@ -615,28 +616,21 @@ namespace Isis { QString msg = "Cannot read settings with a NULL Project pointer."; throw IException(IException::Programmer, msg, _FILEINFO_); } if (project->name() == "Project") { setWindowTitle("ipce"); } else { setWindowTitle( project->name() ); QString projName = project->name(); setWindowTitle(projName ); } QString appName = QApplication::applicationName(); QSettings settings( FileName("$HOME/.Isis/" + appName + "/" + appName + "_" + project->name() + ".config") .expanded(), QSettings::NativeFormat); setGeometry(settings.value("geometry").value<QRect>()); restoreState(settings.value("windowState").toByteArray()); // 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) { Loading @@ -650,7 +644,6 @@ namespace Isis { settings.endGroup(); QStringList projectPathReverseList; for (int i = projectPathList.count()-1;i>=0;i--) { projectPathReverseList.append(projectPathList[i]); } Loading @@ -668,19 +661,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 @@ -710,7 +712,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 +4 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,10 @@ namespace Isis { * @history 2018-06-13 Tracie Sucharski - Fixed cleanup of views and QDockWidgets. * @history 2018-06-13 Kaitlyn Lee - Removed code adding the save active control net button and * the toolpad, since control nets can be saved with the project save button. * @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 { Q_OBJECT Loading Loading
isis/src/qisis/apps/ipce/IpceMainWindow.cpp +58 −56 Original line number Diff line number Diff line Loading @@ -164,13 +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(); // Read default app settings readSettings(m_directory->project() ); QStringList args = QCoreApplication::arguments(); if (args.count() == 2) { Loading Loading @@ -615,28 +616,21 @@ namespace Isis { QString msg = "Cannot read settings with a NULL Project pointer."; throw IException(IException::Programmer, msg, _FILEINFO_); } if (project->name() == "Project") { setWindowTitle("ipce"); } else { setWindowTitle( project->name() ); QString projName = project->name(); setWindowTitle(projName ); } QString appName = QApplication::applicationName(); QSettings settings( FileName("$HOME/.Isis/" + appName + "/" + appName + "_" + project->name() + ".config") .expanded(), QSettings::NativeFormat); setGeometry(settings.value("geometry").value<QRect>()); restoreState(settings.value("windowState").toByteArray()); // 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) { Loading @@ -650,7 +644,6 @@ namespace Isis { settings.endGroup(); QStringList projectPathReverseList; for (int i = projectPathList.count()-1;i>=0;i--) { projectPathReverseList.append(projectPathList[i]); } Loading @@ -668,19 +661,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 @@ -710,7 +712,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 +4 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,10 @@ namespace Isis { * @history 2018-06-13 Tracie Sucharski - Fixed cleanup of views and QDockWidgets. * @history 2018-06-13 Kaitlyn Lee - Removed code adding the save active control net button and * the toolpad, since control nets can be saved with the project save button. * @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 { Q_OBJECT Loading