summaryrefslogtreecommitdiffstats
path: root/src/dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialog.cpp')
-rw-r--r--src/dialog.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp
index 5fa990c..9dba767 100644
--- a/src/dialog.cpp
+++ b/src/dialog.cpp
@@ -20,7 +20,7 @@
#include "vsession.h"
#include "choosersettings.h"
-Dialog::Dialog(int defaultTab, QWidget *parent)
+Dialog::Dialog(int defaultTab, bool allowNative, QWidget *parent)
: QDialog(parent), ui(new Ui::Dialog) {
model_[0] = new SessionTreeModel(parent);
model_[1] = new SessionTreeModel(parent);
@@ -64,8 +64,13 @@ Dialog::Dialog(int defaultTab, QWidget *parent)
this, SLOT(treeView_selectionChanged(const QModelIndex&, const QModelIndex&)));
*/
- this->onTabButtonChanged(0);
- this->selectPreviousSession();
+ if (allowNative) {
+ this->onTabButtonChanged(TAB_NATIVE);
+ this->selectPreviousSession();
+ } else {
+ ui->tabButtonLocal->setEnabled(false);
+ this->onTabButtonChanged(TAB_ALL_VMS);
+ }
//activeTab_ = 2;
//ui->tabButtonAllClasses->setChecked(true);