diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 86eae854..dc47eb98 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -1122,17 +1122,16 @@ void MainWindow::mutedDictionariesChanged() } void MainWindow::showTranslationFor( QString const & inWord, - int inGroup ) + unsigned inGroup ) { ArticleView & view = dynamic_cast< ArticleView & >( *( ui.tabWidget->currentWidget() ) ); navPronounce->setEnabled( false ); - unsigned group = inGroup < 0 ? + unsigned group = inGroup ? inGroup : ( groupInstances.empty() ? 0 : - groupInstances[ groupList.currentIndex() ].id ): - inGroup; + groupInstances[ groupList.currentIndex() ].id ); view.showDefinition( inWord, group ); diff --git a/src/mainwindow.hh b/src/mainwindow.hh index 3ea4a746..4a5f334e 100644 --- a/src/mainwindow.hh +++ b/src/mainwindow.hh @@ -202,7 +202,7 @@ private slots: void mutedDictionariesChanged(); - void showTranslationFor( QString const &, int inGroup = -1 ); + void showTranslationFor( QString const &, unsigned inGroup = 0 ); void trayIconActivated( QSystemTrayIcon::ActivationReason );