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