From cc44ab0ba9122fa5eb2b3b988e4ecb68a4b561c4 Mon Sep 17 00:00:00 2001 From: Oliver Duis Date: Thu, 18 Nov 2010 08:02:57 +0100 Subject: [PATCH] Reduced thumbnail refreshing on enter single tab mode (faster, might be more stable also), see issue #337 --- rtgui/thumbbrowserbase.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index 76a16d92a..354d42144 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -495,7 +495,7 @@ void ThumbBrowserBase::refreshThumbImages () { for (int i=0; iresize (previewHeight);// TODO!!! Might be performance bottleneck - fd[i]->refreshThumbnailImage (); + fd[i]->refreshThumbnailImage (); // TODO: This might cause crashes on some installations } redraw (); @@ -525,10 +525,12 @@ void ThumbBrowserBase::enableTabMode(bool enable) { inTabMode = enable; arrangement = inTabMode ? ThumbBrowserBase::TB_Horizontal : ThumbBrowserBase::TB_Vertical; - if (options.thumbSizeTab!=options.thumbSize) - refreshThumbImages(); - else - redraw(); + if (options.thumbSizeTab!=options.thumbSize) { + for (int i=0; iresize (inTabMode ? options.thumbSizeTab : options.thumbSize); + } + + redraw (); // Scroll to selected position if going into ribbon mode if (inTabMode && !selected.empty()) {