Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /plugins/amplifyfree/AmplifyFreeDialog.cpp [79cc39] .. [2c367f] Maximize Restore

  Switch to side-by-side view

--- a/plugins/amplifyfree/AmplifyFreeDialog.cpp
+++ b/plugins/amplifyfree/AmplifyFreeDialog.cpp
@@ -48,6 +48,7 @@
 QString AmplifyFreeDialog::getCommand()
 {
     QString cmd;
+    ASSERT(curveWidget);
     Parser p(curveWidget->getCommand());
 
     cmd = "amplifyfree(";
@@ -56,6 +57,7 @@
 	cmd += (QString)"," + p.nextParam();
     }
     cmd += ")";
+    debug("AmplifyFreeDialog::getCommand(): '"+cmd+"'");
     return cmd;
 }
 
@@ -65,8 +67,11 @@
     QStringList::Iterator it;
     QString cmd = "curve(";
 
-    for (it = params.begin(); it != params.end(); ++it)
-	cmd += *it + ",";
+    it = params.begin();
+    if (it != params.end()) cmd += *(it++);
+
+    for (; it != params.end(); ++it)
+	cmd += "," + *it;
     cmd += ")";
 
     if (curveWidget) curveWidget->setCurve(cmd);