From b071644756772d0b6930ac2e6d27237b67e7febc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolnai=20Tam=C3=A1s?= Date: Fri, 7 Mar 2014 10:57:52 +0100 Subject: [PATCH 1/2] fdo#74787, rhbz#1072553: Fix deselection problems of template view deselectItems() were added to make recent docs view work, but it is unneccessary to affect template view too. (regression from 0314034d8b23d5b69399cfcdf6b2f2add73f9f47) Conflicts: sfx2/source/control/recentdocsview.cxx Change-Id: I0c805774321939991e308e9c8c669604e81dbad5 Reviewed-on: https://gerrit.libreoffice.org/8490 Tested-by: Michael Stahl Reviewed-by: Michael Stahl --- include/sfx2/recentdocsview.hxx | 2 ++ sfx2/source/control/recentdocsview.cxx | 7 +++++++ sfx2/source/control/thumbnailview.cxx | 2 -- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx index 1706935..d9ad72d 100644 --- a/include/sfx2/recentdocsview.hxx +++ b/include/sfx2/recentdocsview.hxx @@ -66,6 +66,8 @@ protected: void OpenItem( const ThumbnailViewItem *pItem ); virtual void Paint( const Rectangle& rRect ); + virtual void LoseFocus(); + bool isAcceptedFile(const OUString &rURL) const; long mnItemMaxSize; diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index e462172..13f7dc3 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -302,6 +302,13 @@ void RecentDocsView::Paint( const Rectangle &aRect ) ThumbnailView::Paint(aRect); } +void RecentDocsView::LoseFocus() +{ + deselectItems(); + + ThumbnailView::LoseFocus(); +} + void RecentDocsView::SetThumbnailSize(long thumbnailSize) { mnItemMaxSize = thumbnailSize; diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 3c6d094..a4e38a7 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -918,8 +918,6 @@ void ThumbnailView::GetFocus() void ThumbnailView::LoseFocus() { - deselectItems(); - Control::LoseFocus(); // Tell the accessible object that we lost the focus. -- 1.8.3.1