mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-24 04:32:15 -04:00
Tabbar::currentWidget return nullptr if current widget is the settingstab
This commit is contained in:
parent
bccfc1a9b8
commit
4154369ed3
@ -24,7 +24,8 @@ public:
|
||||
WebView* createNewTab(bool setCurrent);
|
||||
WebView* widget(int index) { return (index != 0) ? static_cast<WebView*>(mp_stackedWidget->widget(index)) : nullptr; }
|
||||
WebView* currentWidget() { auto current = mp_stackedWidget->currentWidget();
|
||||
if (current == mp_contentManagerView) return nullptr;
|
||||
if (current == mp_contentManagerView ||
|
||||
mp_stackedWidget->currentIndex() == m_settingsIndex) return nullptr;
|
||||
return static_cast<WebView*>(current);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user