Bug 163053

Summary: Plasma panel doesn't remember size and alignment correctly
Product: [Plasma] plasma4 Reporter: Bart Cerneels <bart.cerneels>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: my plasma-appletsrc
My current plasmarc

Description Bart Cerneels 2008-06-02 11:50:09 UTC
Version:           r815532 (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2.3-2ubuntu7 
OS:                Linux

I used the CASHEW (a.k.a. the configuration mode, blame [ade] for making that an acronym) to move the plasma panel (containment #2) to the right vertical screen edge and to resize it to about 50% aligned center.
The alignment setting isn't saved or used by the next session, neither in horizontal nor vertical placement.
In addition to that (perhaps a separate bug) the size handles of the CASHEW are not aligned with the panel edges at all. Both may be a symptom of not correctly saving or loading the settings.
Comment 1 Bart Cerneels 2008-06-02 11:51:26 UTC
Created attachment 25064 [details]
my plasma-appletsrc

notice how [Containments][2]'s geometry seems to be bogus.
Comment 2 Riccardo Iaconelli 2008-06-10 11:10:51 UTC
We had made some recent commits on this, perhaps it's fixed?
Can you confirm that it doesn't happen anymore with current trunk?
Comment 3 Bart Cerneels 2008-06-10 11:39:44 UTC
It's not fixed in r817471 but will try latest svn now.
Comment 4 Bart Cerneels 2008-06-10 14:22:09 UTC
Not fixed yet in r818994.
Comment 5 Aaron J. Seigo 2008-06-10 17:24:29 UTC
the containments geometry is exactly right. it's the coordinates on the scene (canvas / model), not where it appears on screen.

can you post your plasmarc as well, since that's where the panel alignment, etc, is kept? thanks.
Comment 6 Bart Cerneels 2008-06-10 17:41:07 UTC
Created attachment 25245 [details]
My current plasmarc
Comment 7 Aaron J. Seigo 2008-06-10 18:54:43 UTC
thanks for the quick reply; and now i see the problem.

the panel is containment id 2:

[Containments][2]
plugin=panel

the view id associated with it in plasmarc is:

[ViewIds]
2=-1237832024

and when setting an id, we get:

        } else if (uniqueId > s_maxViewId) {

and s_maxViewId is initialized to 0. so the id never gets assigned -> the settings never get restored.

so ... first i need to figure out how a negative number got set in there, and then decide on a way to make this a little more robust against that kind of breakage.
Comment 8 Aaron J. Seigo 2008-06-10 18:57:38 UTC
SVN commit 819127 by aseigo:

always ensure we have a valid view id.
BUG:163053


 M  +9 -5      view.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=819127