mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
Revert "clean: remove useless code and refactor"
This reverts commit 3a46dd290b
.
the changes is not exactly the same.
close the last tab will cause the windows to create a new blank tab which will fall into infinite loop
This commit is contained in:
parent
8b67a9bd7e
commit
89daa70b6b
|
@ -1834,9 +1834,11 @@ void MainWindow::closeCurrentTab()
|
|||
|
||||
void MainWindow::closeAllTabs()
|
||||
{
|
||||
while ( ui.tabWidget->count() > 0 ) {
|
||||
while ( ui.tabWidget->count() > 1 )
|
||||
closeCurrentTab();
|
||||
}
|
||||
|
||||
// close last tab
|
||||
closeCurrentTab();
|
||||
}
|
||||
|
||||
void MainWindow::closeRestTabs()
|
||||
|
@ -1876,13 +1878,19 @@ void MainWindow::switchToPrevTab()
|
|||
|
||||
void MainWindow::backClicked()
|
||||
{
|
||||
GD_DPRINTF( "Back\n" );
|
||||
|
||||
ArticleView * view = getCurrentArticleView();
|
||||
|
||||
view->back();
|
||||
}
|
||||
|
||||
void MainWindow::forwardClicked()
|
||||
{
|
||||
GD_DPRINTF( "Forward\n" );
|
||||
|
||||
ArticleView * view = getCurrentArticleView();
|
||||
|
||||
view->forward();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue