Bug 88168 - edit plot while maximized on plot causes return to un-maximized and plot re-arangement.
Summary: edit plot while maximized on plot causes return to un-maximized and plot re-a...
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Rick Chern
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-26 22:54 UTC by Matthew Truch
Modified: 2004-08-26 23:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Truch 2004-08-26 22:54:11 UTC
Version:           1.0.0_devel (using KDE KDE 3.2.2)
Installed from:    RedHat RPMs
OS:                Linux

If you edit a plot while that plot is maximized, and then change something, and click on apply edits, the screen gets un-maximized and the plots on the screen get re-arranged.  

expected behavior: the plot is modified, but stays maximized, and none of the plots get rearranged.
Comment 1 Rick Chern 2004-08-26 23:28:01 UTC
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@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"