Changeset 7116dffd in sasview for src


Ignore:
Timestamp:
Jun 14, 2015 4:38:22 PM (10 years ago)
Author:
butler
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:
f3dc56c
Parents:
4faed25
Message:

Added Polarized beam help button (next to mag angle definition button)

Location:
src/sas/perspectives/fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/fitting/basepage.py

    r7801df8 r7116dffd  
    28892889            wx.MessageBox(msg, info) 
    28902890 
    2891     def _on_mag_help(self, event): 
     2891    def _on_mag_angle_help(self, event): 
    28922892        """ 
    28932893        Bring up Magnetic Angle definition bmp image whenever the ? button 
     
    29082908        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
    29092909                                          "Magnetic Angle Defintions") 
     2910 
     2911    def _on_mag_help(self, event): 
     2912        """ 
     2913        Bring up Magnetic Angle definition bmp image whenever the ? button 
     2914        is clicked. Calls DocumentationWindow with the path of the location 
     2915        within the documentation tree (after /doc/ ....". When using old 
     2916        versions of Wx (i.e. before 2.9 and therefore not part of release 
     2917        versions distributed via installer) it brings up an image viewer 
     2918        box which allows the user to click through the rest of the images in 
     2919        the directory.  Not ideal but probably better than alternative which 
     2920        would bring up the entire discussion of how magnetic models work? 
     2921        Specially since it is not likely to be accessed.  The normal release 
     2922        versions bring up the normal image box. 
     2923 
     2924        :param evt: Triggers on clicking ? in Magnetic Angles? box 
     2925        """ 
     2926 
     2927        _TreeLocation = "user/perspectives/fitting/mag_help.html" 
     2928        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     2929                                          "Polarized Beam/Magnetc Help") 
    29102930 
    29112931    def _on_mag_on(self, event): 
  • src/sas/perspectives/fitting/fitpage.py

    r7801df8 r7116dffd  
    293293         
    294294        #Resolution Smearing Help button 
    295         self.btSmearHelp = wx.Button(self, -1, '?') 
     295        self.btSmearHelp = wx.Button(self, -1, '?', style=wx.BU_EXACTFIT) 
    296296        self.btSmearHelp.SetToolTipString("Resolution Smearing Help.") 
    297297        self.btSmearHelp.Bind(wx.EVT_BUTTON, self._onSmearHelp) 
     
    30663066                orient_angle = wx.StaticText(self, -1, '[For 2D only]:') 
    30673067                mag_on_button = wx.Button(self, -1, "Magnetic ON") 
     3068                mag_on_button.SetToolTipString("Turn Pol Beam/Mag scatt on/off") 
    30683069                mag_on_button.Bind(wx.EVT_BUTTON, self._on_mag_on) 
    3069                 mag_help_button = wx.Button(self, -1, "Magnetic angles?") 
     3070                mag_angle_help_button = wx.Button(self, -1, "Magnetic angles?") 
     3071                mag_angle_help_button.SetToolTipString("see angle definitions") 
     3072                mag_help_button = wx.Button(self, -1, "Mag HELP") 
     3073                mag_help_button.SetToolTipString("Help on pol beam/mag fitting") 
    30703074                mag_help_button.Bind(wx.EVT_BUTTON, self._on_mag_help) 
     3075                mag_angle_help_button.Bind(wx.EVT_BUTTON, \ 
     3076                                            self._on_mag_angle_help) 
    30713077                sizer.Add(orient_angle, (iy, ix), (1, 1), 
    30723078                          wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
     
    30743080                sizer.Add(mag_on_button, (iy, ix), (1, 1), 
    30753081                          wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
     3082                ix += 1 
     3083                sizer.Add(mag_angle_help_button, (iy, ix), (1, 1), 
     3084                          wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
    30763085                sizer.Add(mag_help_button, (iy, ix + 1), (1, 1), 
    30773086                          wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
    30783087 
    30793088                #handle the magnetic buttons 
     3089                #clean this up so that assume mag is off then turn  
     3090                #all buttons on IF mag has mag and has 2D 
    30803091                if not self._has_magnetic: 
    30813092                    mag_on_button.Show(False) 
     
    30893100                        mag_on_button.SetLabel("Magnetic OFF") 
    30903101                        mag_help_button.Show(True) 
     3102                        mag_angle_help_button.Show(True) 
    30913103                    else: 
    30923104                        mag_on_button.SetLabel("Magnetic ON") 
    30933105                        mag_help_button.Show(False) 
     3106                        mag_angle_help_button.Show(False) 
    30943107 
    30953108                if not self.data.__class__.__name__ == "Data2D" and \ 
Note: See TracChangeset for help on using the changeset viewer.