Skip to content

Commit

Permalink
Do not send button held messages for non button/key objects on the
Browse files Browse the repository at this point in the history
datamask

Fixed #37
  • Loading branch information
martonmiklos authored and ad3154 committed Nov 9, 2024
1 parent 9aa8fc1 commit 599791b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/DataMaskRenderAreaComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,15 @@ void DataMaskRenderAreaComponent::mouseDown(const MouseEvent &event)
activeMask->get_id(),
keyCode,
ownerServer.get_active_working_set()->get_control_function());
ownerServer.set_button_held(ownerServer.get_active_working_set(),
clickedObject->get_id(),
activeMask->get_id(),
keyCode,
(isobus::VirtualTerminalObjectType::Key == clickedObject->get_object_type()));
if (isobus::VirtualTerminalObjectType::Key == clickedObject->get_object_type() ||
isobus::VirtualTerminalObjectType::Button == clickedObject->get_object_type())
{
ownerServer.set_button_held(ownerServer.get_active_working_set(),
clickedObject->get_id(),
activeMask->get_id(),
keyCode,
(isobus::VirtualTerminalObjectType::Key == clickedObject->get_object_type()));
}
}
}
}
Expand Down

0 comments on commit 599791b

Please sign in to comment.