From d424613ff6db3b75d28823fb733af0169176eb27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= Date: Thu, 5 Oct 2023 22:06:26 +0200 Subject: [PATCH] SendKeysRowSettings: Avoid adding twice the same widgets 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 --- src/main-view/content/row-settings/send-keys-row-settings.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main-view/content/row-settings/send-keys-row-settings.js b/src/main-view/content/row-settings/send-keys-row-settings.js index f22b692..6095960 100644 --- a/src/main-view/content/row-settings/send-keys-row-settings.js +++ b/src/main-view/content/row-settings/send-keys-row-settings.js @@ -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) {