[Kst] [Bug 145434] Plugin dialog not automatically updated with newly created vectors
Andrew Walker
arwalker at sumusltd.com
Mon May 14 23:03:30 CEST 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=145434
arwalker sumusltd com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From arwalker sumusltd com 2007-05-14 23:03 -------
SVN commit 664785 by arwalker:
BUG:145434 update the new style plugin dialog when vectors, scalars, or strings are created
M +4 -0 kst.cpp
M +32 -1 kstbasicdialog_i.cpp
M +1 -0 kstbasicdialog_i.h
--- branches/work/kst/1.5/kst/src/libkstapp/kst.cpp #664784:664785
@ -75,6 +75,7 @
#include "kstmatrixdefaults.h"
#include "kstmonochromedialog_i.h"
#include "kstplugindialog_i.h"
+#include "kstbasicdialog_i.h"
#include "kstprintoptionspage.h"
#include "kstpsddialog_i.h"
#include "kstquickstartdialog_i.h"
@ -2094,6 +2095,9 @
if (!onlyVisible || KstVectorDialogI::globalInstance()->isShown()) {
KstVectorDialogI::globalInstance()->update();
}
+ if (!onlyVisible || KstBasicDialogI::globalInstance()->isShown()) {
+ KstBasicDialogI::globalInstance()->updateForm();
+ }
if (!onlyVisible || KstPluginDialogI::globalInstance()->isShown()) {
KstPluginDialogI::globalInstance()->updateForm();
}
--- branches/work/kst/1.5/kst/src/libkstapp/kstbasicdialog_i.cpp #664784:664785
@ -401,8 +401,39 @
}
+void KstBasicDialogI::updateForm() {
+ KstBasicPluginPtr ptr = kst_cast<KstBasicPlugin>(KstDataObject::plugin(_pluginName));
+ if (!ptr) {
+ return;
+ }
+
+ // input vectors...
+ QStringList iv = ptr->inputVectorList();
+ for (QStringList::ConstIterator ivI = iv.begin(); ivI != iv.end(); ++ivI) {
+ if (VectorSelector *w = vector(*ivI)) {
+ w->update();
+ }
+ }
+
+ // input scalars...
+ QStringList is = ptr->inputScalarList();
+ for (QStringList::ConstIterator isI = is.begin(); isI != is.end(); ++isI) {
+ if (ScalarSelector *w = scalar(*isI)) {
+ w->update();
+ }
+ }
+
+ // input strings...
+ QStringList istr = ptr->inputStringList();
+ for (QStringList::ConstIterator istrI = istr.begin(); istrI != istr.end(); ++istrI) {
+ if (StringSelector *w = string(*istrI)) {
+ w->update();
+ }
+ }
+}
+
+
void KstBasicDialogI::fillFieldsForEdit() {
-
KstBasicPluginPtr ptr = kst_cast<KstBasicPlugin>(_dp);
if (!ptr)
return; //shouldn't happen
--- branches/work/kst/1.5/kst/src/libkstapp/kstbasicdialog_i.h #664784:664785
@ -39,6 +39,7 @
static KstBasicDialogI *globalInstance();
public slots:
+ void updateForm();
virtual void update();
virtual bool newObject();
virtual bool editObject();
More information about the Kst
mailing list