Fix hovering with IsMouseOver
Test / Run tests (push) Successful in 16s

This commit is contained in:
lorenz.stechauner committed 2026-11-06 14:17:34 +01:00
1 parent eaafc47804
commit f784f7871a
2 files changed
+7 -2

No files matched your search

@@ -489,7 +489,8 @@ namespace PamhagenSysCtrl.Windows {
e.Pump.IsActive || Graph.GetFreePath([e.Source, e.Sink], overrideStart: true) == null);
}
private ISet<INode> UpdateScheme(Point pos, bool down) {
private ISet<INode> UpdateScheme(Point? pos, bool down) {
if (!SchemeCanvas.IsMouseOver) pos = null;
foreach (var e in Graph.Edges) {
e.Highlight = null;
e.Flow = null;
@@ -509,7 +510,7 @@ namespace PamhagenSysCtrl.Windows {
SetFastSelectButton(FastSelectButton_MP2_Forward, App.Plant?.State.MP2_State == MotorState.Forward ? 1 : 0, !(App.Plant?.State.MP2_HasClearance ?? false));
SetFastSelectButton(FastSelectButton_MP2_Stop, App.Plant?.State.MP2_State == MotorState.Halt ? 2 : 0);
_hover = Graph.GetHover(pos.X, pos.Y, RoundedScale);
_hover = Graph.GetHover(pos, RoundedScale);
var hoverButtons = FastSelectPaths.Where(b => b.Key.IsMouseOver).ToDictionary();
Path? hoverPathDeactivate = null;
if (App.Plant?.ManualControlMode ?? false) {