diff --git a/src/app/ui/main_window.cpp b/src/app/ui/main_window.cpp index e929a90e5..f55840bb5 100644 --- a/src/app/ui/main_window.cpp +++ b/src/app/ui/main_window.cpp @@ -179,7 +179,7 @@ void MainWindow::showHomeOnOpen() } void MainWindow::showHome() -{ +{ if (!getHomeView()->getParent()) { m_workspace->addView(m_homeView, 0); } @@ -266,7 +266,7 @@ void MainWindow::onActiveViewChange() configureWorkspaceLayout(); } -bool MainWindow::isModifiedTab(Tabs* tabs, TabView* tabView) +bool MainWindow::isTabModified(Tabs* tabs, TabView* tabView) { if (DocumentView* docView = dynamic_cast(tabView)) { Document* document = docView->getDocument(); diff --git a/src/app/ui/main_window.h b/src/app/ui/main_window.h index af22677aa..9ebbcd792 100644 --- a/src/app/ui/main_window.h +++ b/src/app/ui/main_window.h @@ -82,7 +82,7 @@ namespace app { void showDataRecovery(crash::DataRecovery* dataRecovery); // TabsDelegate implementation. - bool isModifiedTab(Tabs* tabs, TabView* tabView) override; + bool isTabModified(Tabs* tabs, TabView* tabView) override; bool canCloneTab(Tabs* tabs, TabView* tabView) override; void onSelectTab(Tabs* tabs, TabView* tabView) override; void onCloseTab(Tabs* tabs, TabView* tabView) override; diff --git a/src/app/ui/tabs.cpp b/src/app/ui/tabs.cpp index 2effaf8e1..0d464dde2 100644 --- a/src/app/ui/tabs.cpp +++ b/src/app/ui/tabs.cpp @@ -100,7 +100,7 @@ void Tabs::addTab(TabView* tabView, bool from_drop, int pos) tab->oldX = (from_drop ? m_dropNewPosX-tab->width/2: tab->x); tab->oldWidth = tab->width; - tab->modified = (m_delegate ? m_delegate->isModifiedTab(this, tabView): false); + tab->modified = (m_delegate ? m_delegate->isTabModified(this, tabView): false); } void Tabs::removeTab(TabView* tabView, bool with_animation) @@ -131,7 +131,7 @@ void Tabs::removeTab(TabView* tabView, bool with_animation) if (with_animation) { if (m_delegate) - tab->modified = m_delegate->isModifiedTab(this, tabView); + tab->modified = m_delegate->isTabModified(this, tabView); tab->view = nullptr; // The view will be destroyed after Tabs::removeTab() anyway resetOldPositions(); @@ -623,7 +623,7 @@ void Tabs::drawTab(Graphics* g, const gfx::Rect& _box, if (m_delegate) { if (tab->view) - tab->modified = m_delegate->isModifiedTab(this, tab->view); + tab->modified = m_delegate->isTabModified(this, tab->view); if (tab->modified && (!hover || !m_hotCloseButton)) { diff --git a/src/app/ui/tabs.h b/src/app/ui/tabs.h index 7c723d209..8c490f1e5 100644 --- a/src/app/ui/tabs.h +++ b/src/app/ui/tabs.h @@ -72,7 +72,7 @@ namespace app { virtual ~TabsDelegate() { } // Returns true if the tab represent a modified document. - virtual bool isModifiedTab(Tabs* tabs, TabView* tabView) = 0; + virtual bool isTabModified(Tabs* tabs, TabView* tabView) = 0; // Returns true if the tab can be cloned. virtual bool canCloneTab(Tabs* tabs, TabView* tabView) = 0;