Skip to content

Commit

Permalink
Fix errors in the canvas dialog from triggering event handles which r…
Browse files Browse the repository at this point in the history
…ely on members being initialized

Bug: 2069691
  • Loading branch information
cameronwhite committed Jun 19, 2024
1 parent 6837338 commit 975cbd0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Pinta/Dialogs/ResizeCanvasDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public ResizeCanvasDialog ()

Gtk.CheckButton percentageRadio = Gtk.CheckButton.NewWithLabel (Translations.GetString ("By percentage:"));
percentageRadio.OnToggled += percentageRadio_Toggled;
percentageRadio.Active = true;

Gtk.SpinButton percentageSpinner = Gtk.SpinButton.NewWithRange (1, int.MaxValue, 1);
percentageSpinner.Value = 100;
Expand Down Expand Up @@ -185,8 +184,6 @@ public ResizeCanvasDialog ()

percentageSpinner.GrabFocus ();

SetAnchor (Anchor.Center);

// --- References to keep

percentage_radio = percentageRadio;
Expand All @@ -204,6 +201,10 @@ public ResizeCanvasDialog ()
sw_button = swButton;
s_button = sButton;
se_button = seButton;

// Final initialization
percentageRadio.Active = true;
SetAnchor (Anchor.Center);
}

private static Gtk.Button CreateAnchorButton ()
Expand Down

0 comments on commit 975cbd0

Please sign in to comment.