Bläddra i källkod

wxGUI: skip 'opacity' part of layer name when saving workispace file

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32494 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 16 år sedan
förälder
incheckning
3a21548588
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3 0
      gui/wxpython/gui_modules/workspace.py

+ 3 - 0
gui/wxpython/gui_modules/workspace.py

@@ -422,6 +422,9 @@ class WriteWorkspaceFile(object):
                 self.file.write('%s</group>\n' % (' ' * self.indent));
             else:
                 name = mapTree.GetItemText(item)
+                # remove 'opacity' part
+                if '(opacity' in name:
+                    name = name.split('(', -1)[0].strip()
                 opacity = maplayer.GetOpacity(float=True)
                 self.file.write('%s<layer type="%s" name="%s" checked="%d" opacity="%f">\n' % \
                                (' ' * self.indent, type, name, checked, opacity));