don't fire changelayer events without a property, and do a more solid changelayer event check before changing the layer zIndex. r=tschaub (closes #3377)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12121 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2011-06-22 06:04:10 +00:00
parent 9b1aca53fa
commit 336f82b771
5 changed files with 29 additions and 9 deletions

View File

@@ -404,7 +404,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
* evt - {Object}
*/
handleMapEvents: function(evt) {
if (!evt.property || evt.property == "order") {
if (evt.type == "removelayer" || evt.property == "order") {
this.moveLayerToTop();
}
},