[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Dec 15 21:06:51 CET 2004


CVS commit by staikos: 

revert formatting changes - extra nesting makes the code more difficult to read
and is no more or less functional.  empty comment lines in the middle of
functions just means less fits in the screen, and again help nothing.


  M +62 -66    kstviewobject.cpp   1.104


--- kdeextragear-2/kst/kst/kstviewobject.cpp  #1.103:1.104
@@ -461,5 +461,8 @@ void KstViewObject::setOnGrid(bool on_gr
 
 void KstViewObject::cleanup(int cols) {
-  if (_children.count() > 0) {
+  if (_children.count() < 1) {
+    return;
+  }
+
     if (!_onGrid) {
       if (cols <= 0) {
@@ -495,14 +498,10 @@ void KstViewObject::cleanup(int cols) {
       QSize sz(w, h);
 
-      //
       // adjust the last column to be sure that we don't spill over
-      //
       if (pos % _columns == _columns - 1) {
         sz.setWidth(_geom.width() - x);
       }
 
-      //
       // adjust the last row to be sure that we don't spill over
-      //
       if ((pos + 1) / _columns > lastRow) {
         sz.setHeight(_geom.height() - y);
@@ -510,7 +509,5 @@ void KstViewObject::cleanup(int cols) {
 
       for (KstViewObjectList::Iterator it = childrenCopy.begin(); it != childrenCopy.end(); ++it) {
-        //
-        // find the plot closest to the desired position, based on the top-left corner...
-        //
+      // find plot closest to the desired position, based on top-left corner...
         distance  = (double)(( x - (*it)->geometry().x() ) * ( x - (*it)->geometry().x() ));
         distance += (double)(( y - (*it)->geometry().y() ) * ( y - (*it)->geometry().y() ));
@@ -533,5 +530,4 @@ void KstViewObject::cleanup(int cols) {
       }
     }
-  }
 }
 





More information about the Kst mailing list