[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Tue Aug 24 23:02:40 CEST 2004
CVS commit by rchern:
Save the <columns> tag as part of the window, not the plot
CCMAIL: 87972-done at 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);
More information about the Kst
mailing list