Bug 501786 - Layout is reset when starting lokalize
Summary: Layout is reset when starting lokalize
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.03.80
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-20 10:01 UTC by Christophe Marin
Modified: 2025-03-23 21:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Marin 2025-03-20 10:01:11 UTC
This happens with current master branch, so probably also with 25.04 beta.

1/ start lokalize
2/ open an existing project
3/ rearrange the lokalize elements to your liking
4/ close / reopen lokalize

The layout is reset
Comment 1 Finley Watson 2025-03-20 20:58:34 UTC
Thanks for reporting. This is known, and is an unfortunate side-effect of the current changes to the underlying tab structure. I think, at least- I have tried to make the layout state system more robust, without much luck. I don't think a fix will be ready for the 25.04 branch unfortunately. The plan is, first fully move to a more sensible tab structure, then I'll ensure that the state saving and restoring works well. Once I start working on this I'll make sure I let you know!
Comment 2 Bug Janitor Service 2025-03-23 01:57:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/lokalize/-/merge_requests/212
Comment 3 Finley Watson 2025-03-23 02:03:58 UTC
The problem was simpler than I had anticipated. Christophe, are you able to test the merge request?
Comment 4 Finley Watson 2025-03-23 11:50:40 UTC
Git commit 7286d371a0f969884ddd8800e1008dd11011dde5 by Finley Watson.
Committed on 23/03/2025 at 11:50.
Pushed by finw into branch 'master'.

Fix editor tab state save / restore

There was a mix-up with converting to and from base64 encoding,
and more broadly there are two slightly conflicting state-saving
mechanisms, one using the field "DockWidgets" within a project
to store the editor tab's QMainWindow state, and the other using
the "EditorStates" global state storage section for project
agnostic editor tab states linked only to the file name the editor
tab is editing.

I've gotten rid of use of the "DockWidgets" fields in favour of the
"EditorStates" section in the hopes that this creates more robust
and longer-term state saving, and have fixed the state saving to
at least as good as it was a few months ago (issues still remain).
Related: bug 412819

M  +1    -1    src/editortab.cpp
M  +2    -2    src/editortab.h
M  +10   -23   src/lokalizemainwindow.cpp

https://invent.kde.org/sdk/lokalize/-/commit/7286d371a0f969884ddd8800e1008dd11011dde5
Comment 5 Christophe Marin 2025-03-23 16:44:47 UTC
(In reply to fin-w from comment #3)
> The problem was simpler than I had anticipated. Christophe, are you able to
> test the merge request?

Tested successfully
Comment 6 Finley Watson 2025-03-23 21:04:05 UTC
Git commit 3caf17be59318d6cf0ebf77b18c0278bf8cf5fa0 by Finley Watson.
Committed on 23/03/2025 at 13:19.
Pushed by finw into branch 'release/25.04'.

Fix editor tab state save / restore

There was a mix-up with converting to and from base64 encoding,
and more broadly there are two slightly conflicting state-saving
mechanisms, one using the field "DockWidgets" within a project
to store the editor tab's QMainWindow state, and the other using
the "EditorStates" global state storage section for project
agnostic editor tab states linked only to the file name the editor
tab is editing.

I've gotten rid of use of the "DockWidgets" fields in favour of the
"EditorStates" section in the hopes that this creates more robust
and longer-term state saving, and have fixed the state saving to
at least as good as it was a few months ago (issues still remain).
Related: bug 412819
(cherry picked from commit 7286d371a0f969884ddd8800e1008dd11011dde5)

M  +1    -1    src/editortab.cpp
M  +2    -2    src/editortab.h
M  +10   -23   src/lokalizemainwindow.cpp

https://invent.kde.org/sdk/lokalize/-/commit/3caf17be59318d6cf0ebf77b18c0278bf8cf5fa0