[Kst] branches/work/kst/1.6/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Wed Dec 5 00:19:16 CET 2007


SVN commit 744957 by arwalker:

BUG:153385 Switch out of z-mode whemn user requests cleanup of layout. Fix other problems with z-mode: axis alignment and nested plots

 M  +15 -11    kst2dplot.cpp  
 M  +6 -1      kstviewobject.cpp  


--- branches/work/kst/1.6/kst/src/libkstapp/kst2dplot.cpp #744956:744957
@@ -2661,19 +2661,23 @@
   // use a common plot region for plots that are aligned and of the same
   //  dimension, in either the horizontal or vertical sense...
   KST::alignment.limits(geometry(), in_xleft_bdr_px, in_xright_bdr_px, in_ytop_bdr_px, in_ybot_bdr_px, 1);
+
+  // only override if not maximized
+  if (!maximized()) {
     // only override if borders are not suppressed
-  if (!_suppressLeft && in_xleft_bdr_px > 0.001) { // x-left border overridden
-    xleft_bdr_px = in_xleft_bdr_px;
+    if (!_suppressLeft && in_xleft_bdr_px > 0.001) { // x-left border overridden
+      xleft_bdr_px = in_xleft_bdr_px;
+    }
+    if (!_suppressRight && in_xright_bdr_px > 0.001) { // x-right border overridden
+      xright_bdr_px = in_xright_bdr_px;
+    }
+    if (!_suppressBottom && in_ybot_bdr_px > 0.001) { // y-bottom border overridden
+      ybot_bdr_px = in_ybot_bdr_px;
+    }
+    if (!_suppressTop && in_ytop_bdr_px > 0.001) { // y-top border overridden
+      ytop_bdr_px = in_ytop_bdr_px;
+    }
   }
-  if (!_suppressRight && in_xright_bdr_px > 0.001) { // x-right border overridden
-    xright_bdr_px = in_xright_bdr_px;
-  }
-  if (!_suppressBottom && in_ybot_bdr_px > 0.001) { // y-bottom border overridden
-    ybot_bdr_px = in_ybot_bdr_px;
-  }
-  if (!_suppressTop && in_ytop_bdr_px > 0.001) { // y-top border overridden
-    ytop_bdr_px = in_ytop_bdr_px;
-  }
 
   QRect RelPlotRegion(d2i(xleft_bdr_px),
       d2i(ytop_bdr_px),
--- branches/work/kst/1.6/kst/src/libkstapp/kstviewobject.cpp #744956:744957
@@ -724,7 +724,12 @@
   double widthTotal = 0.0;
   double widthAverage = 0.0;
 
-  for (KstViewObjectList::ConstIterator i = _children.begin(); i != _children.end(); ++i) {
+  for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) {
+    if ((*i)->maximized()) {
+      (*i)->setMaximized(false);
+      (*i)->recursively<bool>(&KstViewObject::setMaximized, false);
+    }
+
     if ((*i)->followsFlow()) {
       childrenCopy.append(*i);
       widthTotal += (*i)->aspectRatio().w;


More information about the Kst mailing list