Bug 129271 - Plot Dialog -> Apply Settings to: This Window is buggy.
Summary: Plot Dialog -> Apply Settings to: This Window is buggy.
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-16 20:18 UTC by Matthew Truch
Modified: 2006-06-20 19:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
.kst file that shows the problem. (11.23 KB, text/plain)
2006-06-19 22:32 UTC, Matthew Truch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Truch 2006-06-16 20:18:26 UTC
Version:           1.3.0_svn_528442 (using KDE KDE 3.5.2)
OS:                Linux

The apply settings to: this window feature of the plot dialog is buggy.  For example, if you add markers to one plot and also click on apply settings to this window, the markers are only added to the plot you were editing, not all plots in the window.  This is semi-related to bug 111114.
Comment 1 Andrew Walker 2006-06-16 20:37:36 UTC
I'm not able to reproduce this bug. If I have two plots in a window and add a marker to one (by entering the value and hitting Add in the Markers tab) then select the "This window" checkbox and hit "Apply Edits" the new marker is added to both plots. Matt, please add more details on how to reproduce. 
Comment 2 Matthew Truch 2006-06-16 20:46:06 UTC
On Fri, Jun 16, 2006 at 06:37:37PM -0000, Andrew Walker wrote:
> I'm not able to reproduce this bug. If I have two plots in a window
> and add a marker to one (by entering the value and hitting Add in the
> Markers tab) then select the "This window" checkbox and hit "Apply
> Edits" the new marker is added to both plots. Matt, please add more
> details on how to reproduce.


Let me try when I've got a newer kst up and running, since it clearly
isn't new enough.  
Comment 3 Matthew Truch 2006-06-19 22:27:07 UTC
I do not see this pathology with svn trunk as of today and a new instance of kst.  However, I do see the pathology if I use an existing .kst session that I had saved from before with today's svn.  However, this .kst file has other issues (like refering to an equations slave vector as -sv instead of -ysv).  Perhaps it is due to changes in the .kst file format?
Comment 4 Matthew Truch 2006-06-19 22:32:35 UTC
Created attachment 16706 [details]
.kst file that shows the problem.

Attached is the .kst file I am using to show this behavior.  After further
observation, I note that the marker does apply to all plots in the window,
however the marker is only displayed in the plot one was editing, not all other
plots in the window (note: I'm looking at non-live data).  If, however, I go to
the plot dialog for a plot that is 'missing' the marker, I see that it is
listed in the list of markers, and simply clicking on apply in the plot dialog
will show the 'invisible' markers.
Comment 5 Andrew Walker 2006-06-20 00:32:55 UTC
SVN commit 553083 by arwalker:

CCBUG:129271 revert name of y-vector to -sv from -ysv

 M  +2 -2      kstequation.cpp  


--- trunk/extragear/graphics/kst/src/libkstmath/kstequation.cpp #553082:553083
@@ -157,7 +157,7 @@
   _xOutVector = _outputVectors.insert(XOUTVECTOR, xv);
   xv->setProvider(this);
     
-  KstVectorPtr yv = new KstVector(tagName()+"-ysv" , 2);
+  KstVectorPtr yv = new KstVector(tagName()+"-sv" , 2);
   KST::addVectorToList(yv);
   _yOutVector = _outputVectors.insert(YOUTVECTOR, yv);
   yv->setProvider(this);
@@ -327,7 +327,7 @@
 void KstEquation::setTagName(const QString &in_tag) {
   KstObject::setTagName(in_tag);
   (*_xOutVector)->setTagName(in_tag+"-xsv");
-  (*_yOutVector)->setTagName(in_tag+"-ysv");
+  (*_yOutVector)->setTagName(in_tag+"-sv");
 }
 
 
Comment 6 Nicolas Brisset 2006-06-20 14:56:01 UTC
I confirm the problem in comment #4: "Apply to all..." applies the values, but the markers are not redrawn in other plots. In fact, forcing a redraw (like maximizing the plot) makes them show as well. This is slightly annoying and probably easy to fix...
Comment 7 Andrew Walker 2006-06-20 19:35:35 UTC
SVN commit 553314 by arwalker:

BUG:129271 Mark all modified plots as dirty and paint all the necessary windows. Also remove multiple repaints for the window containing the plot being explicitly edited.

 M  +13 -6     kstplotdialog_i.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstplotdialog_i.cpp #553313:553314
@@ -695,6 +695,7 @@
         plotExtra->removeChild(KstViewObjectPtr(vl));
       }
     }
+    plotExtra->setDirty();
   }
 }
 
@@ -758,6 +759,7 @@
     
     // reversed
     plotExtra->setYReversed(_yReversed->isChecked());
+    plotExtra->setDirty();
   }
 }
 
@@ -822,6 +824,7 @@
     }
     
     plotExtra->setXReversed(_xReversed->isChecked());
+    plotExtra->setDirty();
   }
 }
 
@@ -893,6 +896,7 @@
     } else {
       KstDebug::self()->log(i18n( "Internal error: No Y scale type checked in %1." ).arg(Select->currentText()), KstDebug::Error);
     }
+    plotExtra->setDirty();
   }
 }
 
@@ -923,22 +927,24 @@
   applyPlotMarkers(plot);
 
   plot->setDirty();
-  static_cast<KstViewWindow*>(c)->view()->paint(KstPainter::P_PLOT);
 
   // make sure we paint all the necessary windows
   if (appearanceAll->isChecked() ||
       XAxisAll->isChecked() ||
       YAxisAll->isChecked() ||
-      rangeAll->isChecked()) {
+      rangeAll->isChecked() ||
+      markersAll->isChecked()) {
     KMdiIterator<KMdiChildView*> *it = KstApp::inst()->createIterator();
     while (it->currentItem()) {
-      KstViewWindow *c = dynamic_cast<KstViewWindow*>(it->currentItem());
-      if (c) {
-        c->view()->paint(KstPainter::P_PLOT);
+      KstViewWindow *win = dynamic_cast<KstViewWindow*>(it->currentItem());
+      if (win) {
+        win->view()->paint(KstPainter::P_PLOT);
       }
       it->next();
     }
     KstApp::inst()->deleteIterator(it);
+  } else {
+    static_cast<KstViewWindow*>(c)->view()->paint(KstPainter::P_PLOT);
   }
 
   _plotName = Name->text().stripWhiteSpace();
@@ -1472,7 +1478,8 @@
     plotExtra->setLineStyleMarkers(_comboMarkerLineStyle->currentItem());
     plotExtra->setLineWidthMarkers(_spinBoxMarkerLineWidth->value());
     plotExtra->setColorMarkers(_colorMarker->color());
-    plotExtra->setDefaultColorMarker(_checkBoxDefaultMarkerColor->isChecked());  
+    plotExtra->setDefaultColorMarker(_checkBoxDefaultMarkerColor->isChecked());
+    plotExtra->setDirty();
   }
 }