mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
* Fixed not properly deleting temporary pages.
This commit is contained in:
@@ -611,19 +611,22 @@ ViewManager::historyPages() const
|
||||
void
|
||||
ViewManager::destroyPage( ViewPage* page )
|
||||
{
|
||||
if ( !page )
|
||||
return;
|
||||
|
||||
tDebug() << Q_FUNC_INFO << "Deleting page:" << page->title();
|
||||
if ( m_currentPage == page )
|
||||
{
|
||||
delete page;
|
||||
m_currentPage = 0;
|
||||
historyBack();
|
||||
return;
|
||||
}
|
||||
|
||||
QList< Tomahawk::ViewPage* > p = historyPages();
|
||||
if ( p.contains( page ) )
|
||||
historyBack();
|
||||
}
|
||||
else if ( historyPages().contains( page ) )
|
||||
{
|
||||
m_pageHistoryBack.removeAll( page );
|
||||
m_pageHistoryFwd.removeAll( page );
|
||||
|
||||
|
||||
emit historyBackAvailable( m_pageHistoryBack.count() );
|
||||
emit historyForwardAvailable( m_pageHistoryFwd.count() );
|
||||
|
||||
|
Reference in New Issue
Block a user