Hullo,
I now think that this patch (identical to the "quasi" one sent a few days
ago) is the fix for my PostIt cursor vs scroll itch.
If I can quickly expand on this here.....
Grepping for all instances of "LayoutPostIts", turns out that it is called
by seven places throughout the entire project.
Applying pseudo-coding to get at a design perspective - to aid my
understanding:
sw/source/ui/uiview/viewport.cxx
LayoutPostIts called by OuterResizePixel
= when window changes, if postits visible, if cursor on a
postit, that postit must remain in view
sw/source/core/view/viewsh.cxx
by VisPortChanged
= when visual port changes, and if postits visible,
if cursor on a posit, that postit must remain in view
sw/source/ui/docvw/PostItMgr.cxx
Delete
= [n/a]
Delete [author notes overloaded version]
= [n/a]
Hide
= [n/a]
Show
= when postits first appear, i.e. on document load, cursor
is on document proper anyway. otherwise, if postits
visible, if cursor on a postit, that postit must remain in view
CalcHdl [event handler]
= for whatever event we are interested in, if postits visible,
if cursor on a postit, that postit must remain in view.
Unless I've missed something more fundamental, IMHO the pseudo
code above makes little sense.
Removing the code by this patch gives us scrolling how it is for the
document proper. (The postit containing the cursor is brought back to
view by the user typing on the keyboard/arrows as per elsewhere)
However I'm more than OK if this patch needs to be 'shelved' for now :)
Cheers
Andy
From 5d237e53a3574dcef1f30ecf747ec6f7333cf829 Mon Sep 17 00:00:00 2001
From: Andrew W Hearn
Date: Sat, 8 Jan 2011 23:26:13 +0000
Subject: [PATCH] Removed suspect hack. Cursor on post-it now scrolls out of view.
Previously, when the user scrolls when the cursor is within a
post-it note, the main view judders, refusing to let the cursor
go out of view. The removed lines appears to have been a hack
to retain focus of a post-it note containing the cursor.
---
sw/source/ui/docvw/PostItMgr.cxx | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index e06d558..2d599c6 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -719,16 +719,6 @@ void SwPostItMgr::LayoutPostIts()
OSL_ENSURE(mPages[n]->bScrollbar,"SwPostItMgr::LayoutByPage():
note overlaps, but bScrollbar is not true");
}
}
-
- // do some magic so we really see the focused note
- for(SwSidebarWin_iterator i = aVisiblePostItList.begin(); i!=
aVisiblePostItList.end() ; i++)
- {
- if ((*i)->HasChildPathFocus())
- {
- MakeVisible((*i),n+1);
- break;
- }
- }
}
else
{
--
1.7.0.4
Context
- [Libreoffice] [PATCH] cursor vs scroll · Andy Hearn
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.