Fix to allow proper setting of the graph name (editing within the new graph window too!)

This commit is contained in:
Collin Kidder
2015-08-09 19:51:48 -04:00
parent b3d0b76cc6
commit 7b2f36aea3
4 changed files with 35 additions and 25 deletions
+6 -4
View File
@@ -481,9 +481,12 @@ void GraphingWindow::loadDefinitions()
void GraphingWindow::showParamsDialog(int idx = -1)
{
NewGraphDialog *thisDialog = new NewGraphDialog(dbcHandler);
QString oldName;
if (idx > -1) oldName = graphParams[idx].graphName;
if (idx > -1) thisDialog->setParams(graphParams[idx]);
if (idx > -1)
{
thisDialog->setParams(graphParams[idx]);
}
if (thisDialog->exec() == QDialog::Accepted)
{
if (idx > -1) //if there was an existing graph then delete it
@@ -494,7 +497,6 @@ void GraphingWindow::showParamsDialog(int idx = -1)
//create a new graph with the returned parameters.
GraphParams params;
thisDialog->getParams(params);
params.graphName = oldName;
createGraph(params);
}
delete thisDialog;