summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-10-27 18:48:51 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-10-27 23:23:57 +0200
commite142027a26634f51b0fc0903076f980d4a37496a (patch)
treebc2d845402c0bd774ae6bfcf54fbe0124cbbc06a /sd
parent648d6493994869d9ad9a41755b3bf5fd5162e1e1 (diff)
tdf#110002: Sidebar shows 2 as font height for some specific...
... Impress tables cells While clicking inside a table we can avoid to unmark and remark the corresponding table. This unneccessary unmark\remark operations trigger a lot of useless updating stuff. For example it regenerate the whole sidebar while we still in the table so the sidebar's context did not actually change. Change-Id: I4c56b87b032e3cced3f09801147784dd2baaf9ef Reviewed-on: https://gerrit.libreoffice.org/43961 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/futext.cxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 03baf601f141..19f18efa9906 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -299,13 +299,26 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
+ // Don't remark table when clicking in it, mark change triggers a lot of updating
+ bool bMarkChanges = true;
+ rtl::Reference< sdr::SelectionController > xSelectionController(mpView->getSelectionController());
+ if (eHit == SdrHitKind::TextEditObj && xSelectionController.is())
+ {
+ const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
+ if (rMarkList.GetMarkCount() == 1 && rMarkList.GetMark(0)->GetMarkedSdrObj() == aVEvt.pRootObj)
+ bMarkChanges = false;
+ }
+
if (eHit != SdrHitKind::Handle)
{
// deselect selection
if (!rMEvt.IsShift() && eHit == SdrHitKind::TextEditObj)
{
- mpView->UnmarkAll();
- mpView->SetDragMode(SdrDragMode::Move);
+ if(bMarkChanges)
+ {
+ mpView->UnmarkAll();
+ mpView->SetDragMode(SdrDragMode::Move);
+ }
}
}
@@ -321,7 +334,8 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
/* hit text of unmarked object:
select object and set to EditMode */
- mpView->MarkObj(aVEvt.pRootObj, pPV);
+ if (bMarkChanges)
+ mpView->MarkObj(aVEvt.pRootObj, pPV);
if (aVEvt.pObj && dynamic_cast< const SdrTextObj *>( aVEvt.pObj ) != nullptr)
{