mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 01:22:49 +02:00
Explicitly hide inactive view pages
This commit is contained in:
parent
4bd3ff8c18
commit
ebf774c3ac
@ -673,8 +673,14 @@ ViewManager::setPage( ViewPage* page, bool trackHistory )
|
||||
connect( obj, SIGNAL( destroyed( QWidget* ) ), SLOT( onWidgetDestroyed( QWidget* ) ), Qt::UniqueConnection );
|
||||
}
|
||||
|
||||
QWidget *previousPage = m_stack->currentWidget();
|
||||
|
||||
m_stack->setCurrentWidget( page->widget() );
|
||||
|
||||
//This should save the CPU cycles, especially with pages like the visualizer
|
||||
if(previousPage && previousPage != page->widget())
|
||||
previousPage->hide();
|
||||
|
||||
updateView();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user