From b0968e467e59d9bf17a51ad74927b8979c618e23 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 2 Feb 2015 17:23:58 +0100 Subject: Start session on doubleClick signal instead of activated, so we get consistent behaviour on systems with and without KDE --- src/dialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/dialog.cpp') diff --git a/src/dialog.cpp b/src/dialog.cpp index c54dbb5..0344fcb 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -83,9 +83,9 @@ void Dialog::changeEvent(QEvent *e) { } } -void Dialog::on_treeView_activated(QModelIndex index) +void Dialog::on_treeView_doubleClicked(QModelIndex index) { - // this method gets called when a Session has been activated + // this method gets called when a Session has been selected to start SessionTreeItem* item = static_cast(index.internalPointer()); @@ -181,7 +181,7 @@ void Dialog::on_pushButtonAbort_clicked() { } void Dialog::on_pushButtonStart_clicked() { - this->on_treeView_activated(ui->treeView->selectionModel()->currentIndex()); + this->on_treeView_doubleClicked(ui->treeView->selectionModel()->currentIndex()); } bool Dialog::selectSession(const QString& name) { @@ -266,7 +266,7 @@ void Dialog::setTheme() { void Dialog::onCenterTimer() { if (!autoStartEntry_.isEmpty()) { if (this->selectSession(autoStartEntry_)) { - this->on_treeView_activated(ui->treeView->selectionModel()->currentIndex()); + this->on_treeView_doubleClicked(ui->treeView->selectionModel()->currentIndex()); } else { QMessageBox::critical(this, "Autostart", QString::fromUtf8("Konnte %1 nicht starten.").arg(autoStartEntry_)); } -- cgit v1.2.3-55-g7522