/[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 497 by jonathan, Mon Mar 10 10:54:50 2003 UTC revision 498 by jonathan, Mon Mar 10 11:03:22 2003 UTC
# Line 774  class Classifier(NonModalDialog): Line 774  class Classifier(NonModalDialog):
774    
775          self.fieldTypeText.SetLabel(_("Field Type: %s") % text)          self.fieldTypeText.SetLabel(_("Field Type: %s") % text)
776    
777      def __SelectField(self, fieldIndex):      def __SelectField(self, newIndex, oldIndex = -1):
         clazz = self.__BuildClassification(fieldIndex)  
         self.fields.SetClientData(fieldIndex, clazz)  
778    
779          self.__cur_field = self.fields.GetSelection()          assert(oldIndex >= -1)
         self.__SetGridTable(fieldIndex)  
780    
781          enabled = fieldIndex != 0          if oldIndex != -1:
782                clazz = self.__BuildClassification(oldIndex)
783                self.fields.SetClientData(oldIndex, clazz)
784    
785            self.__SetGridTable(newIndex)
786    
787            enabled = newIndex != 0
788    
789          for b in self.controlButtons:          for b in self.controlButtons:
790              b.Enable(enabled)              b.Enable(enabled)
791    
792          self.__SetFieldTypeText(fieldIndex)          self.__SetFieldTypeText(newIndex)
793    
794    
795      def _OnFieldSelect(self, event):      def _OnFieldSelect(self, event):
796          self.__SelectField(self.__cur_field)          index = self.fields.GetSelection()
797            self.__SelectField(index, self.__cur_field)
798            self.__cur_field = index
799    
800      def _OnApply(self, event):      def _OnApply(self, event):
801          """Put the data from the table into a new Classification and hand          """Put the data from the table into a new Classification and hand

Legend:
Removed from v.497  
changed lines
  Added in v.498

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26