summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorAkshay Deep <akshaydeepiitr@gmail.com>2016-09-26 15:42:01 +0530
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-10-05 20:05:34 +0000
commit9167f75c87c5a062c39ee63c4071061518f63b49 (patch)
treebc3cfc7e916558e4bac9f4cdd13a0fc3f431fd7a /sfx2
parent664363eeb6d039fbb82d0afe3dcdecbefeff03da (diff)
tdf#102238 START CENTER: Templates should be activated with single click
Change-Id: If38f8fffd959c50b3befd521d2110e4c54e86be5 Reviewed-on: https://gerrit.libreoffice.org/29295 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/templatedefaultview.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index 5e2d0fcf00eb..de3c20e46ebb 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -61,6 +61,21 @@ void TemplateDefaultView::KeyInput( const KeyEvent& rKEvt )
ThumbnailView::KeyInput(rKEvt);
}
+void TemplateDefaultView::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if( rMEvt.IsLeft() && rMEvt.GetClicks() == 1 )
+ {
+ size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
+ ThumbnailViewItem* pItem = ImplGetItem(nPos);
+ TemplateViewItem* pViewItem = dynamic_cast<TemplateViewItem*>(pItem);
+ if(pViewItem)
+ maOpenTemplateHdl.Call(pViewItem);
+ return;
+ }
+
+ TemplateLocalView::MouseButtonDown(rMEvt);
+}
+
void TemplateDefaultView::createContextMenu()
{
ScopedVclPtrInstance<PopupMenu> pItemMenu;