Do not store app tab in settings
MODIFY
src/mainwindow.cpp
src/mainwindow.cpp
@@ -75,8 +75,6 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), m_ui(new Ui::Main
connect(m_ui->tabbar, &FancyTabBar::activeIndexChanged, this, &MainWindow::tabChanged);
connect(m_ui->tabbar, &FancyTabBar::activeIndexChanged, m_stackedTabs, &QStackedWidget::setCurrentIndex);
connect(m_ui->tabbar, &FancyTabBar::activeIndexChanged, m_editTab, &EditTab::updateProgramViewerHighlighting);
- connect(m_ui->tabbar, &FancyTabBar::activeIndexChanged,
- [=](int index) { RipesSettings::setValue(RIPES_SETTING_APP_TAB, index); });
setupMenus();
@@ -113,7 +111,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), m_ui(new Ui::Main
connect(m_ui->actionVersion, &QAction::triggered, this, &MainWindow::version);
connect(m_ui->actionSettings, &QAction::triggered, this, &MainWindow::settingsTriggered);
- m_ui->tabbar->setActiveIndex(RipesSettings::value(RIPES_SETTING_APP_TAB).toInt());
+ m_ui->tabbar->setActiveIndex(1);
}
#define setupStatusWidget(name) \

MODIFY
src/ripessettings.h
src/ripessettings.h
@@ -17,7 +17,6 @@ namespace Ripes {
#define RIPES_SETTING_CONSOLEFONT ("console_font")
// Program state preserving settings
-#define RIPES_SETTING_APP_TAB ("app_tab")
#define RIPES_SETTING_SETTING_TAB ("settings_tab")
#define RIPES_SETTING_VIEW_ZOOM ("view_zoom")
#define RIPES_SETTING_PROCESSOR_ID ("processor_id")
@@ -37,7 +36,6 @@ const static std::map<QString, QVariant> s_defaultSettings = {
{RIPES_SETTING_CONSOLEFONT, QColor(Qt::black)},
// Program state preserving settings
- {RIPES_SETTING_APP_TAB, 1 /* Processor */},
{RIPES_SETTING_SETTING_TAB, 0},
{RIPES_SETTING_VIEW_ZOOM, 250},
{RIPES_SETTING_PROCESSOR_ID, QVariant() /* Let processorhandler define default */},

Do not store app tab in settings