Changeset 1198

Show
Ignore:
Timestamp:
10/14/08 16:09:56 (3 months ago)
Author:
elemoine
Message:

fix a bug where features are rendered while being unknown to the layer, this bug triggers in the following scenario: (1) create a feature while being online, (2) go offline without prior commit, (3) go back online and activate the drawing tool -> the feature is renderer on the map, and it's not selectable or anything because it's unknown to the vector layer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/camptocamp/MapFishUnhcr/client/mfbase/mapfish/widgets/editing/FeatureEditingPanel.js

    r1133 r1198  
    411411            } 
    412412        ); 
     413        // the modify feature control's deactivate method calls selectControl.unselect 
     414        // if a feature is being modified, this causes problem if that feature isn't 
     415        // known by the vector layer 
     416        this.modifyControl.layer.events.on({ 
     417            featureremoved: function(obj) { 
     418                if (obj.feature == this.feature) { 
     419                    this.feature = null; 
     420                } 
     421            }, 
     422            scope: this.modifyControl 
     423        }); 
    413424 
    414425        this.drawFeatureControl = new OpenLayers.Control.DrawFeature(