[Kst] extragear/graphics/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Sat Nov 25 03:39:51 CET 2006
SVN commit 607549 by netterfield:
The vector selector's edit vector button now invokes the vector's
provider's edit dialog, if the vector is a slave vector (eg, from a
psd).
M +1 -1 libkstapp/kst2dplot.cpp
M +23 -5 widgets/vectorselector.ui.h
--- trunk/extragear/graphics/kst/src/libkstapp/kst2dplot.cpp #607548:607549
@@ -6380,7 +6380,7 @@
provider->showDialog();
provider->unlock();
} else {*/
- curve->showDialog();
+ curve->showDialog(true);
curve->unlock();
// }
}
--- trunk/extragear/graphics/kst/src/widgets/vectorselector.ui.h #607548:607549
@@ -6,8 +6,8 @@
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
+#include "kstdataobject.h"
-
void VectorSelector::init()
{
_provideNoneVector = false;
@@ -131,17 +131,35 @@
void VectorSelector::editVector()
{
- KstDialogs::self()->showVectorDialog(_vector->currentText());
+ KST::vectorList.lock().readLock();
+ KstVectorPtr vec = *KST::vectorList.findTag(_vector->currentText());
+ KST::vectorList.lock().unlock();
+ KstDataObjectPtr pro = 0L;
+ if (vec) {
+ pro = kst_cast<KstDataObject>(vec->provider());
+ }
+ if (pro) {
+ pro->readLock();
+ pro->showDialog(true);
+ pro->unlock();
+ } else {
+ KstDialogs::self()->showVectorDialog(_vector->currentText());
+ }
}
void VectorSelector::setEdit( const QString& tag )
{
KST::vectorList.lock().readLock();
- KstRVectorPtr rvp = kst_cast<KstRVector>(*KST::vectorList.findTag(tag));
- KstSVectorPtr svp = kst_cast<KstSVector>(*KST::vectorList.findTag(tag));
+ KstVectorPtr vec = *KST::vectorList.findTag(tag);
KST::vectorList.lock().unlock();
- _editVector->setEnabled(rvp||svp);
+ KstRVectorPtr rvp = kst_cast<KstRVector>(vec);
+ KstSVectorPtr svp = kst_cast<KstSVector>(vec);
+ KstDataObjectPtr pro = 0L;
+ if (vec) {
+ pro = kst_cast<KstDataObject>(vec->provider());
+ }
+ _editVector->setEnabled(rvp||svp||pro);
}
// vim: ts=8 sw=4 noet
More information about the Kst
mailing list