[Kst] extragear/graphics/kst/src/libkstapp
George Staikos
staikos at kde.org
Tue Apr 11 20:20:21 CEST 2006
SVN commit 528744 by staikos:
use a more sensible number for regridding
M +18 -3 datawizard.ui.h
--- trunk/extragear/graphics/kst/src/libkstapp/datawizard.ui.h #528743:528744
@@ -344,9 +344,24 @@
v = static_cast<KstViewWindow*>(KstApp::inst()->findWindow(_windowName->currentText()));
}
- if (v && v->view()->onGrid()) {
- _plotColumns->setValue(v->view()->columns());
- _reGrid->setChecked(true);
+ if (v) {
+ const KstViewObjectList& children(v->view()->children());
+ int cnt = 0;
+ for (KstViewObjectList::ConstIterator i = children.begin(); i != children.end(); ++i) {
+ if ((*i)->followsFlow()) {
+ ++cnt;
+ }
+ }
+
+ if (v->view()->onGrid()) {
+ _plotColumns->setValue(int(floor(sqrt(_vectorsToPlot->childCount() + cnt))));
+ _reGrid->setChecked(true);
+ } else {
+ _plotColumns->setValue(int(floor(sqrt(_vectorsToPlot->childCount() + cnt))));
+ _reGrid->setChecked(false);
+ }
+ } else {
+ _plotColumns->setValue(int(floor(sqrt(_vectorsToPlot->childCount()))));
}
}
More information about the Kst
mailing list