Bug 495419

Summary: Tab order is not properly restored
Product: [Applications] kate Reporter: Allen Winter <winter>
Component: sessionsAssignee: KWrite Developers <kwrite-bugs-null>
Status: REOPENED ---    
Severity: normal CC: 4wy78uwh, christoph, navid.zamani+kde, wedijo9431
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 24.12.0
Sentry Crash Report:

Description Allen Winter 2024-10-27 09:12:38 UTC
Using freshly built from git master today on Linux Fedora.

In a session, move a tab to the left-most position.
quit kate
start kate
notice that the same tab is not restored to the left-most position

tab order in a session should be properly saved and restored
Comment 1 Christoph Cullmann 2024-10-27 11:34:26 UTC
Could you try

https://invent.kde.org/utilities/kate/-/merge_requests/1618



On 2024-10-27 10:12, Allen Winter wrote:
> https://bugs.kde.org/show_bug.cgi?id=495419
> 
>             Bug ID: 495419
>            Summary: Tab order is not properly restored
>     Classification: Applications
>            Product: kate
>            Version: Git
>           Platform: Other
>                 OS: Linux
>             Status: REPORTED
>           Severity: normal
>           Priority: NOR
>          Component: sessions
>           Assignee: kwrite-bugs-null@kde.org
>           Reporter: winter@kde.org
>   Target Milestone: ---
> 
> Using freshly built from git master today on Linux Fedora.
> 
> In a session, move a tab to the left-most position.
> quit kate
> start kate
> notice that the same tab is not restored to the left-most position
> 
> tab order in a session should be properly saved and restored
Comment 2 Allen Winter 2024-10-27 11:57:37 UTC
yes, that patch seems to work quite well
Comment 3 Christoph Cullmann 2024-10-27 15:11:05 UTC
Git commit d04ee358b6324730366ff7f00d545acaf3b375e8 by Christoph Cullmann.
Committed on 27/10/2024 at 15:11.
Pushed by cullmann into branch 'master'.

ensure we keep the tab order on session restore

M  +48   -1    apps/lib/autotests/kate_view_mgmt_test2.cpp
M  +2    -1    apps/lib/katemainwindow.h
M  +3    -1    apps/lib/katetabbar.h
M  +26   -10   apps/lib/kateviewspace.cpp

https://invent.kde.org/utilities/kate/-/commit/d04ee358b6324730366ff7f00d545acaf3b375e8
Comment 4 Christoph Cullmann 2024-10-27 15:11:25 UTC
Thanks for testing!
Comment 5 Waqar Ahmed 2024-11-06 12:13:10 UTC
*** Bug 495872 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Cullmann 2024-11-12 18:08:26 UTC
*** Bug 496180 has been marked as a duplicate of this bug. ***
Comment 7 Allen Winter 2024-12-11 13:43:29 UTC
This is still happening (or regressed)

I have a session with a 13 documents/tabs
I move one of those tabs to the second position (from left) . then restart kate.
now that tab is in position 13 instead or restored to position 2.
Comment 8 Allen Winter 2024-12-11 13:44:44 UTC
forgot to mention this is with today's kate from git with HEAD 77c61734ca359e9486b320f754198b64c6f2be3f
Comment 9 Christoph Cullmann 2024-12-14 21:47:23 UTC
Hmmm, ok, bad. Not sure how that can happen, added some small test, too. That still works.