Changeset b9f6d83 in sasview for src/sans/plottools/PlotPanel.py


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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) 
Note: See TracChangeset for help on using the changeset viewer.