[Kst] extragear/graphics/kst/src/libkstapp

Duncan Hanson duncan.hanson at gmail.com
Tue Aug 1 19:13:53 CEST 2006


SVN commit 568580 by dhanson:

CCBUG:131620 fixed. the problem was the myOldGeom did not necessarily have the proper aspect ratio, particularly if _geom.setSize(_geom.size().expandedTo(_minimumSize)); had been called.

 M  +2 -1      kstviewobject.cpp  
 M  +1 -0      kstviewobject.h  


--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.cpp #568579:568580
@@ -565,6 +565,7 @@
   _aspect.x = xc; // restore position.
   _aspect.y = yc;
   updateFromAspect();
+  _idealSize = _geom.size();
   for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
     (*i)->parentResized();
   }
@@ -1412,7 +1413,7 @@
     _geom.setBottom(geom.top() + int((_aspect.y + _aspect.h) * geom.height()) - 1);
 
     if (_maintainAspect == true) {
-      QSize maintaining_size(myOldGeom.size());
+      QSize maintaining_size(_idealSize);
       maintaining_size.scale(_geom.size(),QSize::ScaleMin);
       _geom.setSize(maintaining_size);
     }
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.h #568579:568580
@@ -322,6 +322,7 @@
     QGuardedPtr<KstViewObject> _parent; // danger!!
     Q_UINT32 _standardActions, _layoutActions;
     KstAspectRatio _aspect;
+    QSize _idealSize; //ideal size for object. useful when _maintainAspect==true
     KstAspectRatio _aspectOldZoomedObject;
     QString _type;
     QRegion _clipMask; // The mask of this object


More information about the Kst mailing list