Summary: | Re-grid setting in plot dialog is not defaulted correctly after loading a .kst file | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Rick Chern <rchern> |
Component: | general | Assignee: | Rick Chern <rchern> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Rick Chern
2004-08-24 21:39:53 UTC
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); |