Version: 1.0.0_devel (using KDE KDE 3.2.1) Installed from: Unlisted Binary Package OS: Linux How to reproduce: - start kst - produce 4 plots using data wizard - save the kst session to file - (optionally close kst) - open the saved kst session - open the plot dialog The re-grid setting has columns set to 1, even though it should be set to 2. Also, if a custom layout was used before saving, the re-grid setting is checked after loading, even though it should not be.
CVS commit by rchern: Save the <columns> tag as part of the window, not the plot CCMAIL: 87972-done@bugs.kde.org M +5 -2 ksttoplevelview.cpp 1.73 M +3 -4 kstviewobject.cpp 1.89 --- kdeextragear-2/kst/kst/ksttoplevelview.cpp #1.72:1.73 @@ -32,4 +32,5 @@ KstTopLevelView::KstTopLevelView(QWidget *parent, const char *name, WFlags w) : KstViewObject("KstTopLevelView"), _w(new KstViewWidget(this, parent, name, w)) { + _onGrid = true; commonConstructor(); } @@ -44,5 +44,4 @@ KstTopLevelView::KstTopLevelView(QDomEle void KstTopLevelView::commonConstructor() { - _onGrid = true; _focusOn = false; setViewMode(_mode = DisplayMode); @@ -64,4 +63,8 @@ KstObject::UpdateType KstTopLevelView::u void KstTopLevelView::save(QTextStream& ts) { + if (_onGrid && _columns > 0) { // only if on a grid and we have contents + ts << " <columns>" << _columns << "</columns>" << endl; + } + for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) { (*i)->saveTag(ts); --- kdeextragear-2/kst/kst/kstviewobject.cpp #1.88:1.89 @@ -61,5 +61,5 @@ void KstViewObject::load(QDomElement& e) _layoutActions = 0; _maximized = false; - _onGrid = true; + _onGrid = false; _columns = 0; _focus = false; @@ -127,4 +127,5 @@ KstObject::UpdateType KstViewObject::upd void KstViewObject::save(QTextStream& ts) { +KstDebug::self()->log(i18n("KstViewObject::save was called"), KstDebug::Warning); KstAspectRatio aspect; @@ -140,7 +141,5 @@ void KstViewObject::save(QTextStream& ts "\" w=\"" << aspect.w << "\" h=\"" << aspect.h << "\" />" << endl; - if (_onGrid && _columns > 0) { // only if on a grid and we have contents - ts << " <columns>" << _columns << "</columns>" << endl; - } + for (KstViewObjectList::Iterator i = _children.begin(); i != _children.end(); ++i) { (*i)->save(ts);