Changeset 6bc0840 in sasview for src/sas


Ignore:
Timestamp:
Oct 24, 2018 7:40:56 AM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
7ecece1
Parents:
d7d55c7
Message:

Added "Close All Plots" to main window/Window menu

Location:
src/sas/qtgui/MainWindow
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/DataExplorer.py

    r3b95b3b r6bc0840  
    13041304        self.manager.update_stored_data(deleted_names) 
    13051305 
     1306    def closeAllPlots(self): 
     1307        """ 
     1308        Close all currently displayed plots 
     1309        """ 
     1310 
     1311        for plot_id in PlotHelper.currentPlots(): 
     1312            try: 
     1313                plotter = PlotHelper.plotById(plot_id) 
     1314                plotter.close() 
     1315                self.plot_widgets[plot_id].close() 
     1316                self.plot_widgets.pop(plot_id, None) 
     1317            except AttributeError as ex: 
     1318                logging.error("Closing of %s failed:\n %s" % (plot_id, str(ex))) 
     1319 
    13061320    def closePlotsForItem(self, item): 
    13071321        """ 
  • src/sas/qtgui/MainWindow/GuiManager.py

    r6040cd7 r6bc0840  
    511511        self._workspace.actionNext.triggered.connect(self.actionNext) 
    512512        self._workspace.actionPrevious.triggered.connect(self.actionPrevious) 
     513        self._workspace.actionClosePlots.triggered.connect(self.actionClosePlots) 
    513514        # Analysis 
    514515        self._workspace.actionFitting.triggered.connect(self.actionFitting) 
     
    911912        self._workspace.workspace.activatePreviousSubWindow() 
    912913 
     914    def actionClosePlots(self): 
     915        """ 
     916        Closes all Plotters and Plotter2Ds. 
     917        """ 
     918        self.filesWidget.closeAllPlots() 
     919        pass 
     920 
    913921    #============ HELP ================= 
    914922    def actionDocumentation(self): 
  • src/sas/qtgui/MainWindow/UI/MainWindowUI.ui

    refaf022 r6bc0840  
    2525     <y>0</y> 
    2626     <width>915</width> 
    27      <height>21</height> 
     27     <height>26</height> 
    2828    </rect> 
    2929   </property> 
     
    128128    <addaction name="actionPrevious"/> 
    129129    <addaction name="separator"/> 
     130    <addaction name="actionClosePlots"/> 
    130131   </widget> 
    131132   <widget class="QMenu" name="menuAnalysis"> 
     
    571572   </property> 
    572573  </action> 
     574  <action name="actionClosePlots"> 
     575   <property name="text"> 
     576    <string>Close All Plots</string> 
     577   </property> 
     578  </action> 
    573579 </widget> 
    574580 <resources/> 
Note: See TracChangeset for help on using the changeset viewer.