[gnome-maps/wip/mlundblad/fix-selecting-transit-stop] transitLegRow: Don't collapse instructions when clicking




commit 04e5ed8155705d4bc629e4adfb5f8080089fee65
Author: Marcus Lundblad <ml dfupdate se>
Date:   Mon Sep 26 23:15:56 2022 +0200

    transitLegRow: Don't collapse instructions when clicking
    
    Limit the press gesture for expanding/collapsing the
    instructs to the grid containing the basic unexpanded
    information.
    Otherwise selecting a stop, or walking instruction is
    not possible, as the press gesture gets in the way for
    the list box selected signal.

 src/transitLegRow.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/transitLegRow.js b/src/transitLegRow.js
index cde05ee4..b1e06db8 100644
--- a/src/transitLegRow.js
+++ b/src/transitLegRow.js
@@ -120,7 +120,7 @@ export class TransitLegRow extends Gtk.ListBoxRow {
         });
 
         this._buttonPressGesture = new Gtk.GestureSingle();
-        this.add_controller(this._buttonPressGesture);
+        this._grid.add_controller(this._buttonPressGesture);
         this._buttonPressGesture.connect('begin', () => this._onPress());
 
         this._isExpanded = false;
@@ -200,5 +200,6 @@ GObject.registerClass({
                        'detailsRevealer',
                        'agencyLabel',
                        'collapsButton',
-                       'instructionList']
+                       'instructionList',
+                       'grid']
 }, TransitLegRow);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]