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
The same is also true for editing vectors and presumably other object types.
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;