[chronojump] trying jumpsDjOptimalFall ButtonPressEvent AddEvents only on creation
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] trying jumpsDjOptimalFall ButtonPressEvent AddEvents only on creation
- Date: Thu, 3 Sep 2020 13:21:56 +0000 (UTC)
commit 67bde5f26e4ab6f070ef59f4744593076a34320d
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Sep 3 15:21:31 2020 +0200
trying jumpsDjOptimalFall ButtonPressEvent AddEvents only on creation
src/gui/app1/jumpsDjOptimalFall.cs | 4 ++++
src/gui/cairo/jumpsDjOptimalFall.cs | 3 +++
src/gui/cairo/xy.cs | 5 +++++
3 files changed, 12 insertions(+)
---
diff --git a/src/gui/app1/jumpsDjOptimalFall.cs b/src/gui/app1/jumpsDjOptimalFall.cs
index 75d538dd..f1aa3765 100644
--- a/src/gui/app1/jumpsDjOptimalFall.cs
+++ b/src/gui/app1/jumpsDjOptimalFall.cs
@@ -105,8 +105,12 @@ public partial class ChronoJumpWindow
}
private void on_drawingarea_jumps_dj_optimal_fall_expose_event (object o, ExposeEventArgs args)
{
+ /*
+ moved to creation:
+
//needed to have mouse clicks at: on_drawingarea_jumps_weight_fv_profile_button_press_event ()
drawingarea_jumps_dj_optimal_fall.AddEvents((int) (Gdk.EventMask.ButtonPressMask |
Gdk.EventMask.ButtonReleaseMask));
+ */
jumpsDjOptimalFallDo(false); //do not calculate data
//data is calculated on switch page (at notebook_capture_analyze) or on change person
diff --git a/src/gui/cairo/jumpsDjOptimalFall.cs b/src/gui/cairo/jumpsDjOptimalFall.cs
index 6e54c1d4..ae2f6c00 100644
--- a/src/gui/cairo/jumpsDjOptimalFall.cs
+++ b/src/gui/cairo/jumpsDjOptimalFall.cs
@@ -66,6 +66,9 @@ public class JumpsDjOptimalFallGraph : CairoXY
yVariable = heightStr;
xUnits = "cm";
yUnits = "cm";
+
+ //needed to have mouse clicks at: on_drawingarea_jumps_weight_fv_profile_button_press_event ()
+ area.AddEvents((int) (Gdk.EventMask.ButtonPressMask | Gdk.EventMask.ButtonReleaseMask));
}
public override void Do()
diff --git a/src/gui/cairo/xy.cs b/src/gui/cairo/xy.cs
index 0ec558b7..bc30e1b8 100644
--- a/src/gui/cairo/xy.cs
+++ b/src/gui/cairo/xy.cs
@@ -514,18 +514,23 @@ public abstract class CairoXY
writeTextAtRight(line +1, "Y: " + Util.TrimDecimals(realY, 2), false);
*/
+ LogB.Information("calling findClosestGraphPoint ...");
// 3) find closest point (including predicted point if any)
PointF pClosest = findClosestGraphPoint(graphX, graphY);
+ LogB.Information("writeSelectedValues ...");
// 4) write text at right
writeSelectedValues(line, pClosest);
+ LogB.Information("painting rectangle ...");
+ // 4) write text at right
// 5) paint rectangle around that point
g.Color = bluePlots;
g.Rectangle(calculatePaintX(pClosest.X) - 2*pointsRadius, calculatePaintY(pClosest.Y)
-2*pointsRadius,
4*pointsRadius, 4*pointsRadius);
g.Stroke();
g.Color = black;
+ LogB.Information("writeCoordinatesOfMouseClick done!");
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]