mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
Explicitly hide inactive view pages
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user