Jelajahi Sumber

wxNviz: fix unloading maps

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47360 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 13 tahun lalu
induk
melakukan
95766525ff
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 2 1
      gui/wxpython/gui_modules/nviz_mapdisp.py
  2. 1 1
      lib/ogsf/gs.c

+ 2 - 1
gui/wxpython/gui_modules/nviz_mapdisp.py

@@ -825,7 +825,8 @@ class GLWindow(MapWindow, glcanvas.GLCanvas):
         start = time.time()
         
         update = False
-        for layer in self.layers:
+        layersTmp = self.layers[:]
+        for layer in layersTmp:
             if layer in listOfItems:
                 continue
             ltype = self.tree.GetPyData(layer)[0]['type']

+ 1 - 1
lib/ogsf/gs.c

@@ -572,7 +572,7 @@ void gs_free_unshared_buffs(geosurf * fs)
 	    /* for ea att of all other surfs */
 	    for (gs = Surf_top; gs; gs = gs->next) {
 		for (j = 0; j < MAX_ATTS; j++) {
-		    if (old_datah == gs->att[j].hdata) {
+		    if ((old_datah == gs->att[j].hdata) && (fs != gs)) {
 			same = 1;
 		    }
 		}