[gnome-maps/wip/mlundblad/dont-delete-map-bubbles] mapMarker: Don't delete bubble reference when closing bubble




commit 66daec2ada08924687afe9e022125ed4b68eb31e
Author: Marcus Lundblad <ml dfupdate se>
Date:   Fri Sep 2 22:48:44 2022 +0200

    mapMarker: Don't delete bubble reference when closing bubble
    
    This causes the bubble to be recreated. The old instance is still
    alive as it's parented by the map view.

 src/mapMarker.js | 25 -------------------------
 1 file changed, 25 deletions(-)
---
diff --git a/src/mapMarker.js b/src/mapMarker.js
index ecc7644d..91cd5688 100644
--- a/src/mapMarker.js
+++ b/src/mapMarker.js
@@ -217,35 +217,10 @@ export class MapMarker extends Shumate.Marker {
         let goingToSignalId = this._mapView.connect('going-to', () => {
             this.set_selected(false);
         });
-        /*
-        let buttonPressSignalId =
-            this._view.connect('button-press-event', () => {
-                this.set_selected(false);
-            });
-        // Destroy the bubble when the marker is destroyed o removed from a layer
-        let parentSetSignalId = this.connect('parent-set', () => {
-            this.set_selected(false);
-        });
-        let dragMotionSignalId = this.connect('drag-motion', () => {
-            this.set_selected(false);
-        });
-        let markerHiddenSignalId = this.connect('notify::visible', () => {
-            if (!this.visible) {
-                this.set_selected(false);
-            }
-        });
-        */
 
         Utils.once(this.bubble, 'closed', () => {
             this._mapView.disconnect(markerSelectedSignalId);
             this._mapView.disconnect(goingToSignalId);
-            //this._view.disconnect(buttonPressSignalId);
-            //this._view.disconnect(viewTouchEventSignalId);
-            //this.disconnect(parentSetSignalId);
-            //this.disconnect(dragMotionSignalId);
-
-            //this._bubble.destroy();
-            delete this._bubble;
         });
     }
 


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