[Kst] branches/work/kst/portto4/kst/src/libkstapp
Mike Fenton
mike at staikos.net
Tue Nov 11 16:30:27 CET 2008
SVN commit 882895 by fenton:
Fix crash when switching between plugins in the FilterFitDialog.
M +7 -2 filterfitdialog.cpp
M +2 -1 filterfitdialog.h
--- branches/work/kst/portto4/kst/src/libkstapp/filterfitdialog.cpp #882894:882895
@@ -79,6 +79,11 @@
}
+QString FilterFitTab::pluginName() {
+ return _pluginCombo->currentText();
+}
+
+
void FilterFitTab::pluginChanged(const QString &plugin) {
if (plugin != _pluginCombo->currentText()) {
_pluginCombo->setCurrentIndex(_pluginCombo->findText(plugin));
@@ -111,7 +116,7 @@
FilterFitDialog::FilterFitDialog(QString& pluginName, ObjectPtr dataObject, QWidget *parent)
- : DataDialog(dataObject, parent), _pluginName(pluginName), _plotItem(0), _vectorX(0), _vectorY(0) {
+ : DataDialog(dataObject, parent), _plotItem(0), _vectorX(0), _vectorY(0) {
if (editMode() == Edit)
setWindowTitle(tr("Edit Plugin"));
@@ -165,7 +170,7 @@
ObjectPtr FilterFitDialog::createNewDataObject() {
_filterFitTab->configWidget()->save();
- BasicPluginPtr dataObject = kst_cast<BasicPlugin>(DataObject::createPlugin(_pluginName, _document->objectStore(), _filterFitTab->configWidget()));
+ BasicPluginPtr dataObject = kst_cast<BasicPlugin>(DataObject::createPlugin(_filterFitTab->pluginName(), _document->objectStore(), _filterFitTab->configWidget()));
Q_ASSERT(dataObject);
if (!dataObject->isValid()) {
--- branches/work/kst/portto4/kst/src/libkstapp/filterfitdialog.h #882894:882895
@@ -42,6 +42,8 @@
void setPlotMode();
+ QString pluginName();
+
public Q_SLOTS:
void pluginChanged(const QString&);
@@ -72,7 +74,6 @@
private:
void configureTab();
FilterFitTab *_filterFitTab;
- QString _pluginName;
PlotItem* _plotItem;
VectorPtr _vectorX;
VectorPtr _vectorY;
More information about the Kst
mailing list