Changeset 383189f9 in sasview


Ignore:
Timestamp:
May 7, 2008 5:16:37 PM (16 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:
2e07e8f
Parents:
792d7665
Message:

Added plot group ID

Location:
guiframe
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • guiframe/gui_manager.py

    r41d466f r383189f9  
    217217        count = 0 
    218218        for item in self.panels: 
    219             if self.panels[item].window_name == p.window_name: 
     219            if self.panels[item].window_name.startswith(p.window_name):  
    220220                count += 1 
    221221                 
     
    349349            if not self._mgr.GetPane(self.panels[ID].window_name).IsShown(): 
    350350                self._mgr.GetPane(self.panels[ID].window_name).Show() 
     351                # Hide default panel 
     352                self._mgr.GetPane(self.panels["default"].window_name).Hide() 
     353                 
     354                 
    351355            self._mgr.Update() 
    352356         
  • guiframe/local_perspectives/plotting/plotting.py

    r41d466f r383189f9  
    3535    #  tied to any perspective 
    3636    ALWAYS_ON = True 
     37    ## Group ID 
     38    group_id = None 
    3739     
    3840    def __init__(self, parent, id = -1, color = None,\ 
     
    216218            if event.plot._xunit == panel.graph.prop["xunit"] \ 
    217219            and event.plot._yunit == panel.graph.prop["yunit"]: 
    218                 is_available = True 
    219                 panel._onEVT_1DREPLOT(event) 
    220                 self.parent.show_panel(panel.uid) 
     220                if hasattr(event.plot, "group_id"): 
     221                    if not event.plot.group_id==None \ 
     222                        and event.plot.group_id==panel.group_id: 
     223                        is_available = True 
     224                        panel._onEVT_1DREPLOT(event) 
     225                        self.parent.show_panel(panel.uid) 
     226                else: 
     227                    # Check that the plot panel has no group ID 
     228                    if panel.group_id==None: 
     229                        is_available = True 
     230                        panel._onEVT_1DREPLOT(event) 
     231                        self.parent.show_panel(panel.uid) 
    221232         
    222233        # Create a new plot panel if none was available         
    223234        if not is_available: 
    224235            new_panel = View1DPanel(self.parent, -1, style=wx.RAISED_BORDER) 
     236            # Set group ID if available 
     237            group_id_str = '' 
     238            if hasattr(event.plot, "group_id"): 
     239                if not event.plot.group_id==None: 
     240                    new_panel.group_id = event.plot.group_id 
     241                    group_id_str = ' [%s]' % event.plot.group_id 
     242             
    225243            if hasattr(event, "title"): 
    226244                new_panel.window_caption = event.title 
    227245                new_panel.window_name = event.title 
     246                #new_panel.window_caption = event.title+group_id_str 
     247                #new_panel.window_name = event.title+group_id_str 
    228248             
    229249            event_id = self.parent.popup_panel(new_panel) 
  • guiframe/release_notes.txt

    r41d466f r383189f9  
    1616                its own plots. 
    1717        - Provide a hook for a general file loader for the various data formats 
     18        - Add group flag to allow groups of plots (and exclude other plots with 
     19                same units to be plotted in the same Graph. 
    1820         
Note: See TracChangeset for help on using the changeset viewer.