Skip to content

Commit

Permalink
SendKeysRowSettings: Avoid adding twice the same widgets
Browse files Browse the repository at this point in the history
This fixes the following error:

    (com.github.joseexposito.touche:2): Gtk-CRITICAL **: 18:48:10.669:
    gtk_grid_attach: assertion '_gtk_widget_get_parent (child) == NULL'
    failed
  • Loading branch information
JoseExposito committed Oct 5, 2023
1 parent 4c92c99 commit d424613
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main-view/content/row-settings/send-keys-row-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ class SendKeysRowSettings extends Gtk.Grid {
this.attach(repeatLabel, 0, 1, 1, 1);
this.attach(this.repeatSwitch, 1, 1, 1, 1);
this.repeatChanged(isRepeatActive);
this.attach(this.animationLabel, 0, 3, 1, 1);
this.attach(this.animationCombo, 1, 3, 1, 1);
// No need to add them here, added by `repeatChanged`:
// this.attach(this.animationLabel, 0, 3, 1, 1);
// this.attach(this.animationCombo, 1, 3, 1, 1);
}

repeatChanged(isRepeatActive) {
Expand Down

0 comments on commit d424613

Please sign in to comment.