Changeset 83a75c5 in sasview for guiframe


Ignore:
Timestamp:
Apr 27, 2011 7:21:59 PM (14 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:
df68da1
Parents:
1e3394f
Message:

DataPanel?: better display of focused plot on AppendPlotTo?

Location:
guiframe
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • guiframe/data_panel.py

    r1e3394f r83a75c5  
    853853        self.enable_import() 
    854854         
    855     def set_panel_on_focus(self, name): 
     855    def set_panel_on_focus(self, name=None): 
    856856        """ 
    857857        set the plot panel on focus 
     
    861861            if name_plot_panel not in self.cb_plotpanel.GetItems(): 
    862862                self.cb_plotpanel.Append(name_plot_panel, value) 
    863             self.cb_plotpanel.SetStringSelection(name_plot_panel) 
     863            if name != None and name == name_plot_panel: 
     864                self.cb_plotpanel.SetStringSelection(name_plot_panel) 
     865                break 
    864866        self.enable_append() 
    865867     
  • guiframe/gui_manager.py

    r600eca2 r83a75c5  
    220220        application_name = 'No Selected Analysis' 
    221221        if self.panel_on_focus is not None: 
    222             for ID in self.panels.keys(): 
    223                 if self.panel_on_focus != self.panels[ID]: 
    224                     self.panels[ID].on_kill_focus(None) 
     222            if self.panel_on_focus not in self.plot_panels.values(): 
     223                for ID in self.panels.keys(): 
     224                    if self.panel_on_focus != self.panels[ID]: 
     225                        self.panels[ID].on_kill_focus(None) 
    225226 
    226227            if self._data_panel is not None and \ 
     
    21342135        self.panel_on_focus = panel   
    21352136        self.set_panel_on_focus(None) 
    2136         print " on_set_plot_focus" 
    21372137          
    21382138    def _onDrawIdle(self, *args, **kwargs): 
Note: See TracChangeset for help on using the changeset viewer.