summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/templatefolderview.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/sfx2/source/control/templatefolderview.cxx b/sfx2/source/control/templatefolderview.cxx
index 89479cdcccda..ef58cfe26d6c 100644
--- a/sfx2/source/control/templatefolderview.cxx
+++ b/sfx2/source/control/templatefolderview.cxx
@@ -36,6 +36,8 @@
#define INIT_VIEW_COLS 3
#define INIT_VIEW_LINES 1
+void lcl_updateThumbnails (TemplateFolderViewItem *pItem);
+
BitmapEx lcl_ScaleImg (const BitmapEx &rImg, long width, long height)
{
BitmapEx aImg = rImg;
@@ -576,6 +578,11 @@ bool TemplateFolderView::moveTemplates(std::set<const ThumbnailViewItem *> &rIte
if (refresh)
{
+ lcl_updateThumbnails(pSrc);
+ lcl_updateThumbnails(pTarget);
+
+ CalculateItemPositions();
+
Invalidate();
mpItemView->Invalidate();
}
@@ -679,4 +686,24 @@ IMPL_LINK_NOARG(TemplateFolderView, OverlayCloseHdl)
return 0;
}
+void lcl_updateThumbnails (TemplateFolderViewItem *pItem)
+{
+ // Update folder thumbnails
+ for (size_t i = 0, n = pItem->maTemplates.size(); i < 2 && i < n; ++i)
+ {
+ if (i == 0)
+ {
+ pItem->maPreview1 = lcl_ScaleImg(pItem->maTemplates[i]->maPreview1,
+ THUMBNAIL_MAX_WIDTH*0.75,
+ THUMBNAIL_MAX_HEIGHT*0.75);
+ }
+ else
+ {
+ pItem->maPreview1 = lcl_ScaleImg(pItem->maTemplates[i]->maPreview1,
+ THUMBNAIL_MAX_WIDTH*0.75,
+ THUMBNAIL_MAX_HEIGHT*0.75);
+ }
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */