From a8ae8fb70aab96605ad9a8548c0b882e2935666d Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 18 Dec 2012 06:01:42 +0100 Subject: [PATCH] * Disable auto-closing of pages. --- src/sourcetree/items/HistoryItem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sourcetree/items/HistoryItem.cpp b/src/sourcetree/items/HistoryItem.cpp index 93be20dc1..0a61d90c5 100644 --- a/src/sourcetree/items/HistoryItem.cpp +++ b/src/sourcetree/items/HistoryItem.cpp @@ -28,6 +28,8 @@ using namespace Tomahawk; +const unsigned int MAX_HISTORY_ITEMS = 0; // 0 disables this feature + HistoryItem::HistoryItem( SourcesModel* model, SourceTreeItem* parent, const QString& text, int peerSortValue ) : GroupItem( model, parent, text, peerSortValue ) @@ -60,8 +62,8 @@ HistoryItem::tempPageActivated( Tomahawk::ViewPage* v ) } } - // Only keep 5 temporary pages at once - while ( m_tempItems.size() > 4 ) + // Only keep a certain amount of temporary pages at once + while ( MAX_HISTORY_ITEMS > 0 && m_tempItems.size() > MAX_HISTORY_ITEMS ) { TemporaryPageItem* item = m_tempItems.takeFirst(); QTimer::singleShot( 0, item, SLOT( removeFromList() ) );