Bug 385919

Summary: Code folding is not kept after the restart of KDevelop
Product: [Applications] kdevelop Reporter: Silviu <laurentiusilviu>
Component: All build toolsAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.1.2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
URL: https://phabricator.kde.org/D11601
Latest Commit: Version Fixed In: 5.3.0
Sentry Crash Report:

Description Silviu 2017-10-18 15:48:31 UTC
In the last used file I fold all nodes (top level folding)
I restarted KDevelop but all nodes are unfolded, so it didn't keep the last folding nodes.
Comment 1 Kevin Funk 2018-03-25 20:37:35 UTC
Git commit 9d4bd89706ee67a0e335eda3f1732f3eda1f1c23 by Kevin Funk.
Committed on 25/03/2018 at 20:32.
Pushed by kfunk into branch 'master'.

Properly save state of KTextEditor Views

Summary:
Call the KTextEditor::View methods for reading & storing the state:
- KTextEditor::View::readSessionConfig()
- KTextEditor::View::writeSessionConfig()

Remove our implementation of storing the state of ...:
- Cursor
- Selection

By using the KTextEditor methods we do save the states of ...:
- Cursor
- Dynamic Word Wrap
- Text Folding nodes
- ...

Thus, with this patch the storing & retrieving of the selection state is
lost. To be honest, I don't see that as a super useful feature anyway.

FIXED-IN: 5.3.0

Reviewers: mwolff

Reviewed By: mwolff

Subscribers: mwolff, kdevelop-devel

Differential Revision: https://phabricator.kde.org/D11601

M  +12   -31   kdevplatform/shell/textdocument.cpp
M  +3    -2    kdevplatform/shell/textdocument.h
M  +5    -4    kdevplatform/shell/workingsets/workingset.cpp
M  +4    -4    kdevplatform/sublime/view.cpp
M  +18   -4    kdevplatform/sublime/view.h

https://commits.kde.org/kdevelop/9d4bd89706ee67a0e335eda3f1732f3eda1f1c23