Bug 513933

Summary: Make different annotation dialog layouts for multiple databases possible (again)
Product: [Applications] kphotoalbum Reporter: Andreas Schleth <schleth_es>
Component: Annotation DialogAssignee: KPhotoAlbum Bugs <kphotoalbum-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: johannes
Priority: NOR    
Version First Reported In: GIT master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Andreas Schleth 2025-12-28 23:47:56 UTC
SUMMARY

In KPA based on QT5 and before, the dialog layout was saved in "layout.dat" next to the index.xml file.
With the QT6 versions, the layout is saved in ~/.local/state/kphotoalbumstaterc.

STEPS TO REPRODUCE
1.  have 2 databases with different categories
2.  create a layout for the annotation dialog for the first database
3.  save window layout and close db
4.  open the other db, create and save a different window layout
5. open the first db again and open the annotation dialog

OBSERVED RESULT
The layout of the first database is lost (overwritten by the second).

EXPECTED RESULT
The layout should be as saved for each db (as was the case with QT5 and earlier).

SOFTWARE/OS VERSIONS
KPhotoAlbum: v6.1.0-100-g45c7f438a
KDE Frameworks: 6.19.0
Qt: Using 6.9.2 and built against 6.9.2
TUXEDO OS (Xcb)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.14.0-119037-tuxedo

ADDITIONAL INFORMATION
Fortunately, for long term KPA users, there is a workaround if there is an old "layout.dat" present
a) preparation:
* remove ~/.local/state/kphotoalbumstaterc
* start KPA for one db
* save the window layout (as read from the old layout.dat)
* mv kphotoalbumstaterc to a different location (and name)
* repeat for all different dbs using a new name each time
b) use:
Start KPA from a script that moves the right *staterc to ~/.local/state/kphotoalbumstaterc before starting KPA.
You need a separate script for each different database setup.
Limitation: With this workaround, you have only one usable annotation dialog when there are several databases with different setup open at the same time.

Example script (3 lines):
#!/bin/bash
mv ~/utl/kpa_fotorc ~/.local/state/kphotoalbumstaterc
kphotoalbum -c $1