summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-11-13 10:03:10 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-13 10:06:38 +0100
commit1c482cb54b4dab4c5b549ecd2395104f042e4101 (patch)
tree337b2a98afe2f64edb17b21158599b4517d90069 /sw
parent5f8aaeae51b46c59090227d60f39f98ebf0ef767 (diff)
sw: don't show main cursor when editing a postit
This is primarily for tiled editing that doesn't know about multiple cursors, so if both the postit cursor and the main cursor is shown for a short period of time, then the main one is hidden, then gtktiledviewer still shows the main one. OTOH if we can avoid showing the cursor in general just to hide it a bit later in general, let's not do that. With this, the "cursor is shown at the comment anchor, not inside the anchor when clicking on the postit" bug disappears. Change-Id: I2383292c5f84604dc8b126510b0797b8426920ae
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/crsrsh.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 6709941a4fb2..2ad23ba28c39 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -65,6 +65,7 @@
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
#include <comphelper/string.hxx>
+#include <PostItMgr.hxx>
using namespace com::sun::star;
using namespace util;
@@ -1290,6 +1291,15 @@ void SwCrsrShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe
pAktCrsr->Invalidate( aRect );
}
+
+ if (SwPostItMgr* pPostItMgr = GetPostItMgr())
+ {
+ // No point in showing the cursor for Writer text when there is an
+ // active annotation edit.
+ if (bVis)
+ bVis = !pPostItMgr->HasActiveSidebarWin();
+ }
+
if( m_bSVCrsrVis && bVis ) // also show SV cursor again
m_pVisCrsr->Show();
}