diff --git a/graphingwindow.cpp b/graphingwindow.cpp index f9f2d72..e7fc013 100644 --- a/graphingwindow.cpp +++ b/graphingwindow.cpp @@ -521,6 +521,7 @@ void GraphingWindow::showParamsDialog(int idx = -1) { thisDialog->setParams(graphParams[idx]); } + else thisDialog->clearParams(); if (thisDialog->exec() == QDialog::Accepted) { diff --git a/newgraphdialog.cpp b/newgraphdialog.cpp index 2a24a74..41aa28f 100644 --- a/newgraphdialog.cpp +++ b/newgraphdialog.cpp @@ -49,6 +49,18 @@ void NewGraphDialog::colorSwatchClick() } +void NewGraphDialog::clearParams() +{ + ui->txtID->clear(); + ui->txtBias->clear(); + ui->txtMask->clear(); + ui->txtScale->clear(); + ui->txtStride->clear(); + ui->txtName->clear(); + ui->txtData->clear(); + +} + void NewGraphDialog::setParams(GraphParams ¶ms) { ui->txtID->setText(Utility::formatNumber(params.ID)); diff --git a/newgraphdialog.h b/newgraphdialog.h index 6cac7d8..9c9686f 100644 --- a/newgraphdialog.h +++ b/newgraphdialog.h @@ -18,6 +18,7 @@ public: ~NewGraphDialog(); void getParams(GraphParams &); void setParams(GraphParams &); + void clearParams(); private slots: void addButtonClicked();