From 7d61881c1069f83ec1ca4edb9d4da3d7b5b92eb2 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 18 Dec 2012 14:00:02 +0100 Subject: [PATCH] * Set maximum amount of temp pages to 15. --- src/sourcetree/items/HistoryItem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sourcetree/items/HistoryItem.cpp b/src/sourcetree/items/HistoryItem.cpp index 0a61d90c5..144676d0c 100644 --- a/src/sourcetree/items/HistoryItem.cpp +++ b/src/sourcetree/items/HistoryItem.cpp @@ -28,7 +28,7 @@ using namespace Tomahawk; -const unsigned int MAX_HISTORY_ITEMS = 0; // 0 disables this feature +const unsigned int MAX_HISTORY_ITEMS = 15; // 0 disables this feature HistoryItem::HistoryItem( SourcesModel* model, SourceTreeItem* parent, const QString& text, int peerSortValue ) @@ -63,7 +63,7 @@ HistoryItem::tempPageActivated( Tomahawk::ViewPage* v ) } // Only keep a certain amount of temporary pages at once - while ( MAX_HISTORY_ITEMS > 0 && m_tempItems.size() > MAX_HISTORY_ITEMS ) + while ( MAX_HISTORY_ITEMS > 0 && m_tempItems.size() > MAX_HISTORY_ITEMS - 1 ) { TemporaryPageItem* item = m_tempItems.takeFirst(); QTimer::singleShot( 0, item, SLOT( removeFromList() ) );