aboutsummaryrefslogtreecommitdiff
path: root/src/forms
diff options
context:
space:
mode:
Diffstat (limited to 'src/forms')
-rw-r--r--src/forms/profilesdialog.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/forms/profilesdialog.cpp b/src/forms/profilesdialog.cpp
index cf6791c..ed4c871 100644
--- a/src/forms/profilesdialog.cpp
+++ b/src/forms/profilesdialog.cpp
@@ -32,6 +32,16 @@ ProfilesDialog::ProfilesDialog(MainWindow *window, QWidget *parent) :
m_window = window;
m_view = new ProfileView(0, this);
+
+ // Hide the profile view because we're fancy
+ // Give focus to the widget because otherwise the listwidget gains focus
+ // this causes it to select the first item in it, which in turn triggers the signal
+ // and so the profile view gets shown even though the user hasn't selected anything
+ // and so we get to be less fancy, defeating the point of the exercise
+ // [on linux; other OS's not checked]
+ m_view->hide();
+ this->setFocus();
+
ui->setupUi(this);
ui->horizontalLayout->addWidget(m_view);
@@ -62,4 +72,5 @@ void ProfilesDialog::loadSelectedProfile()
void ProfilesDialog::viewProfile(int index)
{
m_view->setProfile(qApp->profile(ui->listWidget->item(index)->data(Qt::UserRole).toString()));
+ m_view->show();
}