unsubscribe from events on the proper layer

This commit is contained in:
Andrew Vardeman
2012-06-04 15:47:43 -05:00
parent 8b2bab9d51
commit cbba98279b

View File

@@ -240,7 +240,7 @@ OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, {
var deactivated = OpenLayers.Control.prototype.deactivate.call(this);
if(deactivated) {
if(this.source && this.source.events) {
this.layer.events.un({
this.source.events.un({
sketchcomplete: this.onSketchComplete,
afterfeaturemodified: this.afterFeatureModified,
scope: this