[Lada-commits] [PATCH] Fixed ort grid selection

Wald Commits scm-commit at wald.intevation.org
Fri Feb 3 17:02:58 CET 2017


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1486137775 -3600
# Node ID cba4e0b0e336638bac438f6d585cf8c37d343455
# Parent  2c5d8988688518d283c81fae9fbaa7c122542e42
Fixed ort grid selection.

diff -r 2c5d89886885 -r cba4e0b0e336 app/controller/form/Ortszuordnung.js
--- a/app/controller/form/Ortszuordnung.js	Fri Feb 03 16:17:46 2017 +0100
+++ b/app/controller/form/Ortszuordnung.js	Fri Feb 03 17:02:55 2017 +0100
@@ -141,7 +141,7 @@
         var win = button.up('window');
         var gridPanel = win.down('panel[name=ortgrid]');
         var osg = win.down('ortstammdatengrid');
-        var oForm = button.up('form');
+        var oForm = button.up('window').down('ortszuordnungform');
         osg.addListener('select',oForm.setOrt, oForm);
         var map = win.down('map');
         if (pressed) {
diff -r 2c5d89886885 -r cba4e0b0e336 app/view/form/Ortszuordnung.js
--- a/app/view/form/Ortszuordnung.js	Fri Feb 03 16:17:46 2017 +0100
+++ b/app/view/form/Ortszuordnung.js	Fri Feb 03 17:02:55 2017 +0100
@@ -148,6 +148,7 @@
 
     setRecord: function(record) {
         this.getForm().loadRecord(record);
+        this.record = record;
         if (!record.get('readonly')) {
             this.down('[action=setOrt]').enable();
             this.setReadOnly(false);
diff -r 2c5d89886885 -r cba4e0b0e336 app/view/panel/Map.js
--- a/app/view/panel/Map.js	Fri Feb 03 16:17:46 2017 +0100
+++ b/app/view/panel/Map.js	Fri Feb 03 17:02:55 2017 +0100
@@ -97,6 +97,9 @@
             return;
         }
         var feature = this.featureLayer.getFeaturesByAttribute('id', record.get('id'))[0];
+        if (!feature) {
+            return;
+        }
         this.map.setCenter(
             new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y));
         this.map.zoomTo(12);


More information about the Lada-commits mailing list