Bug 140208 - Edit Curve does not show correct dialog
Summary: Edit Curve does not show correct dialog
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-17 20:22 UTC by Andrew Walker
Modified: 2007-01-19 14:56 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 Andrew Walker 2007-01-17 20:22:01 UTC
Version:           HEAD (using KDE KDE 3.5.1)
Installed from:    Compiled From Sources
OS:                Linux

PROBLEM:

When trying to edit a curve from the RMB menu in a plot the New Curve dialog is displayed

STEPS TO REPODUCE:

Start Kst using "kst -y 1 gyrodata.dat" for example
Select "Edit... Plot Object: 1" from the RMB menu

RESULTS:

The New Curve dialog is displayed

EXPECTED RESULTS:

The Edit Curve dialog is diaplayed
Comment 1 Andrew Walker 2007-01-17 20:23:31 UTC
The same is also true for editing vectors and presumably other object types.
Comment 2 Netterfield 2007-01-19 14:56:09 UTC
SVN commit 625207 by netterfield:

Default parameters can sometimes be evil...
so: get rid of the default, and require explicit edit/new parameters
for each call to showDialog.

BUG: 140208



 M  +1 -1      libkstapp/kst.cpp  
 M  +1 -1      libkstapp/kst2dplot.cpp  
 M  +1 -1      libkstapp/ksttoplevelview.cpp  
 M  +2 -2      libkstapp/kstviewmanager_i.cpp  
 M  +1 -1      libkstapp/kstviewobject.cpp  
 M  +1 -1      libkstapp/kstviewobject.h  
 M  +1 -1      libkstmath/kstdataobject.h  


--- trunk/extragear/graphics/kst/src/libkstapp/kst.cpp #625206:625207
@@ -1017,7 +1017,7 @@
 
   if ( newPlugins.contains( p ) ) {
     KstDataObjectPtr ptr = KstDataObject::plugin(p);
-    ptr->showDialog();
+    ptr->showDialog(true);
   } else if ( oldPlugins.contains( p ) ) {
       KstPluginDialogI::globalInstance()->showNew(readable[p]);
   }
--- trunk/extragear/graphics/kst/src/libkstapp/kst2dplot.cpp #625206:625207
@@ -3243,7 +3243,7 @@
   KstBaseCurvePtr curve = *(Curves.findTag(_curveEditMap[id]));
   if (curve) {
     curve->readLock();
-    curve->showDialog();
+    curve->showDialog(true);
     curve->unlock();
   }
 }
--- trunk/extragear/graphics/kst/src/libkstapp/ksttoplevelview.cpp #625206:625207
@@ -1722,7 +1722,7 @@
 bool KstTopLevelView::handleDoubleClick(const QPoint& pos, bool shift) {
   handlePress(pos, shift);
   if (_pressTarget) {
-    _pressTarget->showDialog(this);  
+    _pressTarget->showDialog(this, false);  
   }  
   return true;
 }
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewmanager_i.cpp #625206:625207
@@ -528,13 +528,13 @@
     } else if (qi->rtti() == RTTI_OBJ_VIEW_OBJECT) {
       KstViewObjectPtr obj = koi->viewObject(&win);
       if (obj && win) {
-        obj->showDialog(win->view());  
+        obj->showDialog(win->view(), false);  
       }
     } else if (qi->rtti() == RTTI_OBJ_DATA_OBJECT) {
       Kst2DPlotPtr plot;
       KstDataObjectPtr obj = koi->dataObject(plot);
       if (obj) {
-        obj->showDialog();  
+        obj->showDialog(true);  
       }
     }
   } else {
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.cpp #625206:625207
@@ -1271,7 +1271,7 @@
 
 void KstViewObject::edit() {
   KstTopLevelViewPtr tlv = kst_cast<KstTopLevelView>(KstViewObjectPtr(_topObjectForMenu));
-  showDialog(tlv);
+  showDialog(tlv, false);
 }
 
 
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewobject.h #625206:625207
@@ -267,7 +267,7 @@
     virtual void zoomToggle();
     virtual void copyObject();
     virtual KstViewObject* copyObjectQuietly(KstViewObject& parent, const QString& name = QString::null) const;
-    virtual bool showDialog(KstTopLevelViewPtr invoker, bool isNew = false);
+    virtual bool showDialog(KstTopLevelViewPtr invoker, bool isNew);
 
   protected slots:
     virtual void parentResized();
--- trunk/extragear/graphics/kst/src/libkstmath/kstdataobject.h #625206:625207
@@ -114,7 +114,7 @@
     QString version() const { return _version; }
     QString library() const { return _library; }
 
-    void showDialog( bool edit = false );
+    void showDialog( bool edit );
 
   protected slots:
     virtual void showNewDialog() = 0;