Ignore:
Timestamp:
Jun 21, 2012 7:33:44 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
19b9e43
Parents:
f5500b3
Message:

fixing more Mac bugs

Location:
calculatorview/src/sans/perspectives/calculator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/data_operator.py

    rf5500b3 r848913c  
    100100        self.data1_cbox = wx.ComboBox(self, -1, size=(_BOX_WIDTH, 25),  
    101101                                      style=wx.CB_READONLY) 
    102         self.operator_cbox = wx.ComboBox(self, -1, size=(50, 25),  
     102        self.operator_cbox = wx.ComboBox(self, -1, size=(50, -1),  
    103103                                         style=wx.CB_READONLY) 
    104104        operation_tip = "Add: +, Subtract: -, " 
     
    152152            self.numberctr.Show(False) 
    153153        else: 
    154             self.numberctr.Disable() 
     154            self.numberctr.Enable(False) 
    155155        wx.EVT_TEXT_ENTER(self.data_namectr, -1, self.on_name) 
    156156        wx.EVT_TEXT_ENTER(self.numberctr, -1, self.on_number)  
     
    262262        text = item.GetLabel().strip().lower() 
    263263        if ON_MAC: 
    264             self.numberctr.Enable() 
     264            self.numberctr.Enable(text=='number') 
    265265        else: 
    266266            self.numberctr.Show(text=='number') 
     
    268268        pos = item.GetSelection() 
    269269        data = item.GetClientData(pos) 
    270         if not self.numberctr.IsShown(): 
     270        content = "?" 
     271        if not self.numberctr.IsShown() or self.numberctr.Disabled(): 
    271272            if data == None: 
    272273                content = "?" 
  • calculatorview/src/sans/perspectives/calculator/model_editor.py

    rf5500b3 r848913c  
    381381        item = event.GetEventObject() 
    382382        text = item.GetValue().strip() 
    383         if text == '+': 
     383        if text == '*': 
     384            name = 'Multi' 
     385            factor = 'BackGround' 
     386            f_oper = '+' 
     387        elif text == '+': 
    384388            name = 'Sum' 
    385389            factor = 'scale_factor' 
    386390            f_oper = '*' 
    387         elif text == '*': 
    388             name = 'Multi' 
    389             factor = 'BackGround' 
    390             f_oper = '+' 
     391         
    391392        else: 
    392             raise 
     393            text = '+' 
     394            name = 'Sum' 
     395            factor = 'scale_factor' 
     396            f_oper = '*' 
    393397        self.factor = str(factor) 
    394398        self.operator = text 
Note: See TracChangeset for help on using the changeset viewer.