[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Thu Aug 26 23:27:55 CEST 2004
CVS commit by rchern:
When maximized, turn onGrid off, and return to previous onGrid state when unmaximized.
Save the previous onGrid state if maximized.
CCMAIL: 88168-done at bugs.kde.org
M +7 -2 ksttoplevelview.cpp 1.75
M +4 -2 kstviewobject.cpp 1.90
M +1 -0 kstviewobject.h 1.71
--- kdeextragear-2/kst/kst/ksttoplevelview.cpp #1.74:1.75
@@ -64,5 +64,11 @@ KstObject::UpdateType KstTopLevelView::u
void KstTopLevelView::save(QTextStream& ts) {
- if (_onGrid && _columns > 0) { // only if on a grid and we have contents
+ bool temp_onGrid;
+ if (_maximized) {
+ temp_onGrid = _prevOnGrid;
+ } else {
+ temp_onGrid = _onGrid;
+ }
+ if (temp_onGrid && _columns > 0) { // only if on a grid and we have contents
ts << " <columns>" << _columns << "</columns>" << endl;
}
--- kdeextragear-2/kst/kst/kstviewobject.cpp #1.89:1.90
@@ -127,5 +127,4 @@ KstObject::UpdateType KstViewObject::upd
void KstViewObject::save(QTextStream& ts) {
-KstDebug::self()->log(i18n("KstViewObject::save was called"), KstDebug::Warning);
KstAspectRatio aspect;
@@ -890,4 +889,5 @@ void KstViewObject::zoomToggle() {
}
updateFromAspect();
+ setOnGrid(_prevOnGrid);
} else {
_maximized = true;
@@ -898,4 +898,6 @@ void KstViewObject::zoomToggle() {
resizeFromAspect(0.0, 0.0, 1.0, 1.0);
raiseToTop();
+ _prevOnGrid = onGrid();
+ setOnGrid(false);
}
--- kdeextragear-2/kst/kst/kstviewobject.h #1.70:1.71
@@ -211,4 +211,5 @@ class KstViewObject : public KstObject {
bool _selected : 1;
bool _onGrid : 1;
+ bool _prevOnGrid : 1;
bool _maximized : 1;
int _columns : 6; // "64 columns ought to be enough for anyone"
More information about the Kst
mailing list