Skip to content

Commit

Permalink
Prevent the arrow toggles from stealing focus from the canvas
Browse files Browse the repository at this point in the history
This can cause confusing behaviour by consuming hotkeys such as Enter that are intended to be used for finalizing the shape tools.

Fixes: #2092414
  • Loading branch information
cameronwhite committed Dec 23, 2024
1 parent 5889113 commit 18b9fcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Pinta.Tools/Editable/EditEngines/ArrowedEditEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ private Gtk.CheckButton ArrowOneEnabledCheckBox
private Gtk.CheckButton CreateArrowOneEnabledCheckBox ()
{
Gtk.CheckButton result = Gtk.CheckButton.NewWithLabel ("1");
result.FocusOnClick = false;
result.Active = settings.GetSetting (ARROW1_SETTING (tool_prefix), previous_settings_1.Show);
result.OnToggled += (o, e) => ArrowEnabledToggled (true);
return result;
Expand All @@ -284,6 +285,7 @@ private Gtk.CheckButton ArrowTwoEnabledCheckBox
private Gtk.CheckButton CreateArrowTwoEnabledCheckBox ()
{
Gtk.CheckButton result = Gtk.CheckButton.NewWithLabel ("2");
result.FocusOnClick = false;
result.Active = settings.GetSetting (ARROW2_SETTING (tool_prefix), previous_settings_2.Show);
result.OnToggled += (o, e) => ArrowEnabledToggled (false);
return result;
Expand Down

0 comments on commit 18b9fcd

Please sign in to comment.