aboutsummaryrefslogtreecommitdiff
path: root/src/subwindow/tabwidget.h
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2019-02-15 20:37:19 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2019-02-15 20:37:19 +0200
commitbe77ca07e282a233ef44f12fdeb3dec502046580 (patch)
treeb7ccb12fb934cfd5f40c30ac4c5a504d7293386b /src/subwindow/tabwidget.h
parentAdd configure script (diff)
downloadsmolbote-be77ca07e282a233ef44f12fdeb3dec502046580.tar.xz
SubWindow: closing tab restores previous index
SubWindow keeps track of its previous tab index, and when a tab is closed, the previous index should be restored.
Diffstat (limited to 'src/subwindow/tabwidget.h')
-rw-r--r--src/subwindow/tabwidget.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/subwindow/tabwidget.h b/src/subwindow/tabwidget.h
index d615bcb..d67d2de 100644
--- a/src/subwindow/tabwidget.h
+++ b/src/subwindow/tabwidget.h
@@ -45,9 +45,9 @@ protected:
void contextMenuEvent(QContextMenuEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
-
-
private:
+ int current = -1;
+ int previous = -1;
QMenu *tabContextMenu;
QQueue<TabInformation> m_closedTabs;
};