Changeset b9f6d83 in sasview for src


Ignore:
Timestamp:
Apr 1, 2014 5:23:29 AM (10 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
aba5876
Parents:
b099388
Message:

Re #216 Merging wx30 branch

Location:
src/sans
Files:
59 edited

Legend:

Unmodified
Added
Removed
  • src/sans/guiframe/data_panel.py

    r5777106 rb9f6d83  
    329329        wx.EVT_BUTTON(self, self.bt_freeze.GetId(), self.on_freeze) 
    330330        
    331         if sys.platform == 'darwin' and build_options.WXPORT == 'osx_cocoa': 
     331        if sys.platform == 'darwin': 
    332332            self.cb_plotpanel = wx.ComboBox(self, -1,  
    333333                                            style=wx.CB_READONLY) 
  • src/sans/guiframe/data_processor.py

    rf468791 rb9f6d83  
    12781278                      (-1, -1), 
    12791279                      (-1, -1), 
    1280                       (-1, -1), 
    1281                       (-1, -1), 
    1282                       (-1, -1), 
     1280                      #(-1, -1), 
     1281                      #(-1, -1), 
     1282                      #(-1, -1), 
    12831283                      (-1, 1)]) 
    12841284    
  • src/sans/guiframe/local_perspectives/plotting/Plotter1D.py

    rf468791 rb9f6d83  
    485485                    "Plotting Error: %s"% msg, info="error"))  
    486486            # Check if zoomed 
    487             toolbar_zoomed = self.toolbar.GetToolEnabled(self.toolbar._NTB2_BACK) 
     487            try: tb = self.toolbar.wx_ids['Back'] 
     488            except AttributeError: tb = self.toolbar._NTB2_BACK # Cruft 
     489            toolbar_zoomed = self.toolbar.GetToolEnabled(tb) 
    488490            if self.is_zoomed or toolbar_zoomed: 
    489491                # Recover the x,y limits 
     
    565567        self.subplot.figure.canvas.draw_idle()   
    566568        # Check if zoomed 
    567         toolbar_zoomed = self.toolbar.GetToolEnabled(self.toolbar._NTB2_BACK) 
     569        try: tb = self.toolbar.wx_ids['Back'] 
     570        except AttributeError: tb = self.toolbar._NTB2_BACK # Cruft 
     571        toolbar_zoomed = self.toolbar.GetToolEnabled(tb) 
    568572        if self.is_zoomed or toolbar_zoomed: 
    569573            # Recover the x,y limits 
  • src/sans/guiframe/local_perspectives/plotting/Plotter2D.py

    rf468791 rb9f6d83  
    250250        self.default_zmax_ctl = self.zmax_2D 
    251251        # Check if zoomed 
    252         toolbar_zoomed = self.toolbar.GetToolEnabled(self.toolbar._NTB2_BACK) 
     252        try: tb = self.toolbar.wx_ids['Back'] 
     253        except AttributeError: tb = self.toolbar._NTB2_BACK # Cruft 
     254        toolbar_zoomed = self.toolbar.GetToolEnabled(tb) 
    253255        if not self.is_zoomed and not toolbar_zoomed: 
    254256            return 
  • src/sans/perspectives/fitting/batchfitpage.py

    r5777106 rb9f6d83  
    2525    window_caption  = "BatchFit" 
    2626 
    27     def __init__(self, parent, color='rand'): 
     27    def __init__(self, parent, color=None): 
    2828        """  
    2929        Initialization of the Panel 
  • src/sans/perspectives/fitting/fitpage.py

    r5777106 rb9f6d83  
    3737    """ 
    3838 
    39     def __init__(self, parent, color='rand'): 
     39    def __init__(self, parent, color=None): 
    4040        """ 
    4141        Initialization of the Panel 
     
    137137                if not is_data: 
    138138                    is_data = check_data_validity(data) 
    139         self.dataSource.SetSelection(0) 
    140         self.on_select_data(event=None) 
     139        if is_data: 
     140            self.dataSource.SetSelection(0) 
     141            self.on_select_data(event=None) 
    141142                 
    142143    def on_select_data(self, event=None): 
  • src/sans/plottools/PlotPanel.py

    ra9d5684 rb9f6d83  
    11071107        self._onEVT_FUNC_PROPERTY(False) 
    11081108        # Check if zoomed 
    1109         toolbar_zoomed = self.toolbar.GetToolEnabled(self.toolbar._NTB2_BACK) 
     1109        try: tb = self.toolbar.wx_ids['Back'] 
     1110        except AttributeError: tb = self.toolbar._NTB2_BACK # Cruft 
     1111        toolbar_zoomed = self.toolbar.GetToolEnabled(tb) 
     1112 
    11101113        if self.is_zoomed or toolbar_zoomed: 
    11111114            # Recover the x,y limits 
     
    12591262                handles2, labels2 = zip(*hl) 
    12601263                self.line_collections_list = handles2 
    1261                 self.legend = ax.legend(handles2, labels2, numpoints=1, 
     1264                try: 
     1265                    self.legend = ax.legend(handles2, labels2, numpoints=1, 
     1266                                prop=FontProperties(size=10), 
     1267                                handletextsep=.05, loc=self.legendLoc) 
     1268                except TypeError:  # Cruft 
     1269                    # older MPL uses handletextsep instead of handletextpad 
     1270                    self.legend = ax.legend(handles2, labels2, numpoints=1, 
    12621271                                prop=FontProperties(size=10), 
    12631272                                handletextsep=.05, loc=self.legendLoc) 
     
    12681277                 
    12691278            except: 
    1270                 self.legend = ax.legend(prop=FontProperties(size=10), 
     1279                try: 
     1280                    self.legend = ax.legend(prop=FontProperties(size=10), 
     1281                                        numpoints=1, handletextpad=.05, 
     1282                                        loc=self.legendLoc) 
     1283                except TypeError:  # Cruft 
     1284                    # older MPL uses handletextsep instead of handletextpad 
     1285                    self.legend = ax.legend(prop=FontProperties(size=10), 
    12711286                                        numpoints=1, handletextsep=.05, 
    12721287                                        loc=self.legendLoc) 
  • src/sans/plottools/canvas.py

    ra9d5684 rb9f6d83  
    266266            self.panel.parent.set_plot_unfocus() 
    267267            self.panel.on_set_focus(None) 
    268          
    269268        return 
     269 
     270    # CRUFT: wx 3.0.0.0 on OS X doesn't release the mouse on leaving window 
     271    def _onLeave(self, evt): 
     272        if self.HasCapture(): self.ReleaseMouse() 
     273        super(FigureCanvas,self)._onLeave(evt) 
Note: See TracChangeset for help on using the changeset viewer.