[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Mon Oct 4 15:20:32 CEST 2004


CVS commit by staikos: 

fix SIGFPE


  M +1 -1      ksttoplevelview.cpp   1.78
  M +6 -1      ksttoplevelview.h   1.46


--- kdeextragear-2/kst/kst/ksttoplevelview.cpp  #1.77:1.78
@@ -988,5 +988,5 @@ QSize KstTopLevelView::averageChildSize(
     heights += (*i)->geometry().height();
   }
-  return QSize(widths / _children.count(), heights / _children.count());
+  return _children.count() > 0 ? QSize(widths / _children.count(), heights / _children.count()) : QSize(0, 0);
 }
 

--- kdeextragear-2/kst/kst/ksttoplevelview.h  #1.45:1.46
@@ -124,5 +124,10 @@ KstSharedPtr<T> KstTopLevelView::createP
     cleanup();
   } else {
-    plot->resize(averageChildSize());
+    QSize sz = averageChildSize();
+    if (sz != QSize(0, 0)) {
+      plot->resize(sz);
+    } else {
+      plot->resize(size());
+    }
     // First look at the overall clip mask.  If there are gaps, take the
     // biggest one and use that location.





More information about the Kst mailing list