Merge pull request #529 from adv-isu/ControlSplitDeactivateFix

OpenLayers.Control.Split.deactivate event unregistration fix.
This commit is contained in:
Tim Schaub
2012-06-13 09:11:45 -07:00
2 changed files with 14 additions and 9 deletions

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