X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=mainwindow.cpp;fp=mainwindow.cpp;h=cbc276bc379e80ae0c24602d472175cff0b31231;hb=946845241309761b49151cc3c7a597dc4b969961;hp=fb078299cd93fac90755cdfa427ed5e06c03f048;hpb=046c6572d6b0d6facf3df72ed31f195328347cb7;p=pierogi diff --git a/mainwindow.cpp b/mainwindow.cpp index fb07829..cbc276b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -72,8 +72,7 @@ MainWindow::MainWindow(QWidget *parent) connect( ui->favoriteKeysetsWidget, -// SIGNAL(itemActivated(QListWidgetItem *)), - SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), + SIGNAL(itemActivated(QListWidgetItem *)), this, SLOT(keysetSelectionChanged(QListWidgetItem *)), Qt::QueuedConnection); @@ -893,6 +892,12 @@ void MainWindow::keysetSelectionChanged( PIRKeysetWidgetItem *kwi = dynamic_cast(item); if (!kwi) return; // Also need to say something here + + if (currentKeyset == kwi->getID()) + { + // We're already on that keyset, so nothing to do: + return; + } currentKeyset = kwi->getID(); @@ -1093,6 +1098,8 @@ void MainWindow::selectPrevFavKeyset() position, QItemSelectionModel::ClearAndSelect); + keysetSelectionChanged(ui->favoriteKeysetsWidget->currentItem()); + // Tell the user about the change: QMaemo5InformationBox::information( 0, @@ -1122,6 +1129,8 @@ void MainWindow::selectNextFavKeyset() position, QItemSelectionModel::ClearAndSelect); + keysetSelectionChanged(ui->favoriteKeysetsWidget->currentItem()); + // Tell the user about the change: QMaemo5InformationBox::information( 0,