Open the last selected tab on restart

This commit is contained in:
fourtf
2018-04-10 15:59:53 +02:00
parent d0f1ea8502
commit c744659ce0
3 changed files with 26 additions and 8 deletions
+14
View File
@@ -119,6 +119,20 @@ void Notebook::removeCurrentPage()
this->removePage(this->selectedPage);
}
SplitContainer *Notebook::getOrAddSelectedPage()
{
if (selectedPage == nullptr) {
this->addNewPage(true);
}
return selectedPage;
}
SplitContainer *Notebook::getSelectedPage()
{
return selectedPage;
}
void Notebook::select(SplitContainer *page)
{
if (page == this->selectedPage) {
+2 -8
View File
@@ -30,14 +30,8 @@ public:
void select(SplitContainer *page);
void selectIndex(int index);
SplitContainer *getOrAddSelectedPage()
{
if (selectedPage == nullptr) {
this->addNewPage(true);
}
return selectedPage;
}
SplitContainer *getOrAddSelectedPage();
SplitContainer *getSelectedPage();
void performLayout(bool animate = true);