[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Nov 13 01:07:13 PST 2015
sw/source/core/crsr/crsrsh.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 1c482cb54b4dab4c5b549ecd2395104f042e4101
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Nov 13 10:03:10 2015 +0100
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
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 6709941..2ad23ba 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();
}
More information about the Libreoffice-commits
mailing list