[chronojump] Trying to fix encoder updating bars on capture on slower machines
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Trying to fix encoder updating bars on capture on slower machines
- Date: Wed, 13 Aug 2014 12:50:47 +0000 (UTC)
commit df135a9493912acd2b722e89df59a53175787d98
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Aug 13 14:50:13 2014 +0200
Trying to fix encoder updating bars on capture on slower machines
src/gui/encoder.cs | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 53b7af1..b250e04 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -3485,7 +3485,7 @@ public partial class ChronoJumpWindow
if(graphSignal)
updateEncoderCaptureGraphPaint();
if(calcCurves)
- updateEncoderCaptureGraphRCalc(plotCurvesBars);
+ updateEncoderCaptureGraphRCalcPre(plotCurvesBars);
}
}
@@ -3562,6 +3562,18 @@ public partial class ChronoJumpWindow
string encoderCaptureStringR;
double massDisplacedEncoder = 0;
ArrayList captureCurvesBarsData;
+ static bool updatingEncoderCaptureGraphRCalc;
+
+ private void updateEncoderCaptureGraphRCalcPre(bool plotCurvesBars)
+ {
+ Log.WriteLine(" PERFORMING CALCULATIONS A ");
+
+ //check if this helps to show bars on slow computers
+ if(! updatingEncoderCaptureGraphRCalc) {
+ updateEncoderCaptureGraphRCalc(plotCurvesBars);
+ updatingEncoderCaptureGraphRCalc = false;
+ }
+ }
private void updateEncoderCaptureGraphRCalc(bool plotCurvesBars)
{
@@ -3572,6 +3584,9 @@ public partial class ChronoJumpWindow
return;
if(ecca.ecc.Count <= ecca.curvesDone)
return;
+
+ updatingEncoderCaptureGraphRCalc = true;
+ Log.WriteLine(" PERFORMING CALCULATIONS B ");
EncoderCaptureCurve ecc = (EncoderCaptureCurve) ecca.ecc[ecca.curvesDone];
Log.Write("\n" + ecc.DirectionAsString() + " " + ecc.startFrame.ToString() + " " +
ecc.endFrame.ToString());
@@ -4251,6 +4266,7 @@ public partial class ChronoJumpWindow
if(action == encoderActions.CAPTURE) {
captureCurvesBarsData = new ArrayList();
+ updatingEncoderCaptureGraphRCalc = false;
encoderThread = new Thread(new ThreadStart(encoderDoCaptureCsharp));
GLib.Idle.Add (new GLib.IdleHandler
(pulseGTKEncoderCaptureAndCurves));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]