dbhub: Open Preferences dialog on the correct tab

When opening the Preferences dialog from the Remote dock, we now show
the Remote tab by default.
This commit is contained in:
Martin Kleusberg
2018-12-12 14:10:28 +01:00
parent 88ce4acf97
commit d86b45e7e6
4 changed files with 25 additions and 6 deletions

View File

@@ -13,7 +13,7 @@
#include <QKeyEvent>
#include <QStandardPaths>
PreferencesDialog::PreferencesDialog(QWidget* parent)
PreferencesDialog::PreferencesDialog(QWidget* parent, Tabs tab)
: QDialog(parent),
ui(new Ui::PreferencesDialog),
m_dbFileExtensions(Settings::getValue("General", "DBFileExtensions").toString().split(";;"))
@@ -43,6 +43,9 @@ PreferencesDialog::PreferencesDialog(QWidget* parent)
// Avoid different heights due to having check boxes or not
ui->treeSyntaxHighlighting->setUniformRowHeights(true);
// Set current tab
ui->tabWidget->setCurrentIndex(tab);
}
/*