[chronojump] Encoder: Signal is saved only if it's ok
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder: Signal is saved only if it's ok
- Date: Sun, 18 Nov 2012 21:01:27 +0000 (UTC)
commit cd1106c90905863f80f5845873314f7f2b869fe5
Author: Xavier de Blas <xaviblas gmail com>
Date: Sun Nov 18 19:21:11 2012 +0100
Encoder: Signal is saved only if it's ok
src/gui/encoder.cs | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 49cba44..fa32935 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -585,9 +585,15 @@ public partial class ChronoJumpWindow
} else if(mode == "allCurves") {
signalOrCurve = "curve";
feedback = Catalog.GetString("All curves saved");
- } else //mode == "signal"
+ } else { //mode == "signal"
signalOrCurve = "signal";
+ //check if data is ok (maybe encoder was not connected, then don't save this signal)
+ EncoderCurve curve = treeviewEncoderCurvesGetCurve(1, false);
+ if(curve.N == null)
+ return "";
+ }
+
string desc = "";
if(mode == "curve" || mode == "allCurves") {
EncoderCurve curve = treeviewEncoderCurvesGetCurve(selectedID,true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]