From d298aea249710dba4a2647d66e95ffd29b8987ec Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Tue, 18 Aug 2015 20:07:04 -0400 Subject: [PATCH] Fix to no longer default to new graphs being the first DBC signal loaded. The previous behavior always loaded that first signal and that made graphing custom things more annoying as the signal parameters all had to be deleted first. --- graphingwindow.cpp | 1 + newgraphdialog.cpp | 12 ++++++++++++ newgraphdialog.h | 1 + 3 files changed, 14 insertions(+) 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();