Bug 340121

Summary: Annotation window layout does not save image size correctly
Product: [Applications] kphotoalbum Reporter: Andreas Schleth <schleth_es>
Component: Annotation DialogAssignee: KPhotoAlbum Bugs <kpabugs>
Status: CONFIRMED ---    
Severity: normal CC: tl
Priority: NOR    
Version: GIT master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: the layout as it should be
the layout as it comes up after KPA restart

Description Andreas Schleth 2014-10-19 13:44:24 UTC
see two attachments.
I like to have a fairly large image preview in my annotation dialog (annotation_window_as_was_saved.jpg).  
Saving this layout does not help.  After restart, the image preview comes up much smaller than in the saved layout (annotation_after_restart.jpg).

I deleted all my layout.dat (layout.xml) files and created a new layout from scratch.  This did not help.


Reproducible: Always

Steps to Reproduce:
1. create a layout for the annotation dialog with a large image preview
2. save the window layout
3. close KPA and restart
4. open annotation dialog: the image preview is too small (smaller than saved)

Actual Results:  
image preview is too small

Expected Results:  
image preview should be the same size as saved

(going to add the images in the comments)
Comment 1 Andreas Schleth 2014-10-19 13:45:17 UTC
Created attachment 89198 [details]
the layout as it should be
Comment 2 Andreas Schleth 2014-10-19 13:46:07 UTC
Created attachment 89199 [details]
the layout as it comes up after KPA restart
Comment 3 Andreas Schleth 2015-01-01 15:09:59 UTC
I fiddled around with the window layout a bit and dived (without goggles;) through the source.  My findings:
- with 4.1.1 this did work OK (made with KDE 4.8.5) the code is exactly the same as in the current revison (just calls to QMainWindow.restoreState oder saveState).
- now, according to this:  
http://qt-project.org/doc/qt-4.8/qmainwindow.html#saveState 
the geometry needs to be saved separately (???).  At least the doc is ambiguous.
- I fiddled a bit with the code, without success so far: just writing/reading a second file with the byte-string for geometry does not help.  
- Some more googling hints to a problem of the QT-Framework.  See here:
https://bugreports.qt-project.org/browse/QTBUG-15080
and, possibly, a workaround here:
https://bugreports.qt-project.org/browse/QTBUG-16252?focusedCommentId=250562&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-250562
Comment 4 Tobias Leupold 2016-12-14 21:19:43 UTC
I'm seeing the same. At the moment, I don't have an idea how to fix this, though ;-)