/[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 606 by jonathan, Fri Apr 4 12:16:39 2003 UTC revision 611 by jonathan, Fri Apr 4 16:34:46 2003 UTC
# Line 780  class Classifier(NonModalDialog): Line 780  class Classifier(NonModalDialog):
780          # calling __SelectField after creating the classGrid fills in the          # calling __SelectField after creating the classGrid fills in the
781          # grid with the correct information          # grid with the correct information
782          #print "2------------------"          #print "2------------------"
783            self.fields.SetSelection(self.__cur_field)
784          self.__SelectField(self.__cur_field, group = group)          self.__SelectField(self.__cur_field, group = group)
785    
786          #self.classGrid.SelectGroup(group)          #self.classGrid.SelectGroup(group)
# Line 908  class Classifier(NonModalDialog): Line 909  class Classifier(NonModalDialog):
909          self.fieldTypeText.SetLabel(_("Field Type: %s") % text)          self.fieldTypeText.SetLabel(_("Field Type: %s") % text)
910    
911      def __SelectField(self, newIndex, oldIndex = -1, group = None):      def __SelectField(self, newIndex, oldIndex = -1, group = None):
912            """This method assumes that the current selection for the
913            combo has already been set by a call to SetSelection().
914            """
915    
916          #print "3------------------"          #print "3------------------"
917    
918          assert oldIndex >= -1          assert oldIndex >= -1
919    
         self.fields.SetSelection(newIndex)  
   
920          if oldIndex != -1:          if oldIndex != -1:
921              clazz = self.__BuildClassification(oldIndex)              clazz = self.__BuildClassification(oldIndex)
922              self.fields.SetClientData(oldIndex, clazz)              self.fields.SetClientData(oldIndex, clazz)
# Line 1131  class SelectPropertiesDialog(wxDialog): Line 1133  class SelectPropertiesDialog(wxDialog):
1133    
1134      def __GetColor(self, cur):      def __GetColor(self, cur):
1135          dialog = wxColourDialog(self)          dialog = wxColourDialog(self)
1136          if cur is not Color.None:          if cur is not Color.Transparent:
1137              dialog.GetColourData().SetColour(Color2wxColour(cur))              dialog.GetColourData().SetColour(Color2wxColour(cur))
1138    
1139          ret = None          ret = None
# Line 1149  class SelectPropertiesDialog(wxDialog): Line 1151  class SelectPropertiesDialog(wxDialog):
1151          self.previewWin.Refresh() # XXX: work around, see ClassDataPreviewer          self.previewWin.Refresh() # XXX: work around, see ClassDataPreviewer
1152    
1153      def _OnChangeLineColorTrans(self, event):      def _OnChangeLineColorTrans(self, event):
1154          self.prop.SetLineColor(Color.None)          self.prop.SetLineColor(Color.Transparent)
1155          self.previewWin.Refresh() # XXX: work around, see ClassDataPreviewer          self.previewWin.Refresh() # XXX: work around, see ClassDataPreviewer
1156                    
1157      def _OnChangeFillColor(self, event):      def _OnChangeFillColor(self, event):
# Line 1159  class SelectPropertiesDialog(wxDialog): Line 1161  class SelectPropertiesDialog(wxDialog):
1161          self.previewWin.Refresh() # XXX: work around, see ClassDataPreviewer          self.previewWin.Refresh() # XXX: work around, see ClassDataPreviewer
1162    
1163      def _OnChangeFillColorTrans(self, event):      def _OnChangeFillColorTrans(self, event):
1164          self.prop.SetFill(Color.None)          self.prop.SetFill(Color.Transparent)
1165          self.previewWin.Refresh() # XXX: work around, see ClassDataPreviewer          self.previewWin.Refresh() # XXX: work around, see ClassDataPreviewer
1166    
1167      def GetClassGroupProperties(self):      def GetClassGroupProperties(self):
# Line 1212  class ClassDataPreviewer: Line 1214  class ClassDataPreviewer:
1214              h = rect.GetHeight()              h = rect.GetHeight()
1215    
1216          stroke = prop.GetLineColor()          stroke = prop.GetLineColor()
1217          if stroke is Color.None:          if stroke is Color.Transparent:
1218              pen = wxTRANSPARENT_PEN              pen = wxTRANSPARENT_PEN
1219          else:          else:
1220              pen = wxPen(Color2wxColour(stroke),              pen = wxPen(Color2wxColour(stroke),
# Line 1220  class ClassDataPreviewer: Line 1222  class ClassDataPreviewer:
1222                          wxSOLID)                          wxSOLID)
1223    
1224          stroke = prop.GetFill()          stroke = prop.GetFill()
1225          if stroke is Color.None:          if stroke is Color.Transparent:
1226              brush = wxTRANSPARENT_BRUSH              brush = wxTRANSPARENT_BRUSH
1227          else:          else:
1228              brush = wxBrush(Color2wxColour(stroke), wxSOLID)              brush = wxBrush(Color2wxColour(stroke), wxSOLID)

Legend:
Removed from v.606  
changed lines
  Added in v.611

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26