Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll on note when switching notes #520

Closed
dpradov opened this issue Nov 7, 2015 · 1 comment
Closed

Scroll on note when switching notes #520

dpradov opened this issue Nov 7, 2015 · 1 comment

Comments

@dpradov
Copy link
Owner

dpradov commented Nov 7, 2015

From #208:

One other slight annoyance - not sure if
it's really related or not - but when switching notes (no change needed), the
positioning of the note will have changed. By just observing the behavior now,
it seems that note is be scrolled so that the previous cursor position will be
at the bottom of the edit area.

Original comment by rikker...@gmail.com on 9 Jun 2010 at 4:49

@dpradov
Copy link
Owner Author

dpradov commented Dec 31, 2015

The problem was originated in changes from #57

Now, apart from only invoking from PagesChange to EditorToDataStream when is really necessary (when there have been changes in a mirrored node of that one we are now selecting), changes have been made to optimize, reducing, the movements between the Editor and the Stream of the nodes/notes, only copying from Editor to Stream of node/note when there are modifications in the Editor.

The last modification does also have an useful and important consequence: if we don't modify a node or note, it will not be modified when the file is saved to disk. So, if there is any compatibility problems between the RTF content of the node/note and the RichEdit version, perhaps will not be correctly shown, but will be maintained unchanged in disk.

dpradov added a commit that referenced this issue Dec 31, 2015
With the change made in #520, in EditorToDataStream (TTabNote and TTreeNote), to only copy from Editor to Stream of node/note when there are modifications in the Editor, its necessary that the stream of the node/note is always available. But in TTabNote.DataStreamToEditor, after copying to the Editor the data stream was cleared. I think that it was a risky optimization, based on the fact that EditorToDataStream was always called at the end.

Without this correction, the changes in #520 would cause the RTF notes to be saved empty!

Signed-off-by: Daniel Prado Velasco <dpradov@users.noreply.github.com>
@dpradov dpradov mentioned this issue Feb 26, 2017
dpradov added a commit that referenced this issue Feb 26, 2017
It is related to a problem arised with changes in #520 and partially corrected with commit 4b969a2.

The (big) problem affects only to Standard Rich text notes (non multi-level tree): they are being saved empty after the second time the file is saved, if its content have been not modified.

Signed-off-by: Daniel Prado Velasco <dpradov@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant