summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-03-07 10:57:52 +0100
committerMichael Stahl <mstahl@redhat.com>2014-03-07 04:34:09 -0600
commitb071644756772d0b6930ac2e6d27237b67e7febc (patch)
tree5ff8d079d7ddcb019d536ce718cb5c9f950101ee
parentb1119c7b80b70672f86c3415725bc0806be14981 (diff)
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 <mstahl@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--include/sfx2/recentdocsview.hxx2
-rw-r--r--sfx2/source/control/recentdocsview.cxx7
-rw-r--r--sfx2/source/control/thumbnailview.cxx2
3 files changed, 9 insertions, 2 deletions
diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index 1706935a5ac8..d9ad72d58383 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 e4621729edc7..13f7dc311c07 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 3c6d0942c7e0..a4e38a7eccd0 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.