/[thuban]/trunk/thuban/Thuban/UI/classifier.py
ViewVC logotype

Diff of /trunk/thuban/Thuban/UI/classifier.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2766 by dpinte, Wed May 2 23:37:02 2007 UTC revision 2817 by bernhard, Sun Jan 27 00:01:32 2008 UTC
# Line 25  import wx Line 25  import wx
25  from wx import grid  from wx import grid
26    
27  from Thuban import _  from Thuban import _
28    from Thuban.UI import internal_from_wxstring
29  from Thuban.UI.common import Color2wxColour, wxColour2Color  from Thuban.UI.common import Color2wxColour, wxColour2Color
30    
31  from Thuban.Model.messages import MAP_LAYERS_REMOVED, LAYER_SHAPESTORE_REPLACED  from Thuban.Model.messages import MAP_LAYERS_REMOVED, LAYER_SHAPESTORE_REPLACED
# Line 930  class Classifier(LayerProperties): Line 931  class Classifier(LayerProperties):
931              fieldName = None              fieldName = None
932              fieldType = None              fieldType = None
933          else:          else:
934              fieldName = self.fields.GetString(fieldIndex)              fieldName = internal_from_wxstring(self.fields.GetString(fieldIndex))
935              fieldType = self.layer.GetFieldType(fieldName)              fieldType = self.layer.GetFieldType(fieldName)
936    
937          clazz = self.fields.GetClientData(fieldIndex)          clazz = self.fields.GetClientData(fieldIndex)
# Line 956  class Classifier(LayerProperties): Line 957  class Classifier(LayerProperties):
957                      self.layer.GetClassification().                      self.layer.GetClassification().
958                                 GetDefaultGroup().GetProperties()))                                 GetDefaultGroup().GetProperties()))
959    
960          fieldName = self.fields.GetString(fieldIndex)          fieldName = internal_from_wxstring(self.fields.GetString(fieldIndex))
961          fieldType = self.layer.GetFieldType(fieldName)          fieldType = self.layer.GetFieldType(fieldName)
962    
963          self.classGrid.CreateTable(clazz, fieldType,          self.classGrid.CreateTable(clazz, fieldType,
# Line 966  class Classifier(LayerProperties): Line 967  class Classifier(LayerProperties):
967          """Set the field type string using the data type of the field          """Set the field type string using the data type of the field
968          at fieldIndex.          at fieldIndex.
969          """          """
970          fieldName = self.fields.GetString(fieldIndex)          fieldName = internal_from_wxstring(self.fields.GetString(fieldIndex))
971          fieldType = self.layer.GetFieldType(fieldName)          fieldType = self.layer.GetFieldType(fieldName)
972    
973          assert Classifier.type2string.has_key(fieldType)          assert Classifier.type2string.has_key(fieldType)
# Line 1053  class Classifier(LayerProperties): Line 1054  class Classifier(LayerProperties):
1054          """Open up a dialog for the user to generate classifications."""          """Open up a dialog for the user to generate classifications."""
1055    
1056          self.genDlg = ClassGenDialog(self, self.layer,          self.genDlg = ClassGenDialog(self, self.layer,
1057                            self.fields.GetString(self.__cur_field))                internal_from_wxstring(self.fields.GetString(self.__cur_field)))
1058    
1059          self.Bind(wx.EVT_CLOSE, self._OnGenDialogClose, self.genDlg)          self.Bind(wx.EVT_CLOSE, self._OnGenDialogClose, self.genDlg)
1060    

Legend:
Removed from v.2766  
changed lines
  Added in v.2817

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26