Changeset b789967 in sasview


Ignore:
Timestamp:
Feb 4, 2017 1:01:26 PM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
e712ca5
Parents:
965fbd8
Message:

More minor fixes to plotting

Location:
src/sas/qtgui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Invariant/InvariantPerspective.py

    raadf0af1 rb789967  
    270270            extrapolated_data = self._manager.createGuiData(extrapolated_data) 
    271271            extrapolated_data.name = title 
     272            extrapolated_data.title = title 
    272273 
    273274            # Add the plot to the model item 
     
    288289            high_out_data = inv.get_extra_data_high(q_end=qmax_plot, npts=500) 
    289290 
     291            # Plot the chart 
     292            title = "High-Q extrapolation" 
     293 
    290294            # Convert the data into plottable 
    291295            high_out_data = self._manager.createGuiData(high_out_data) 
    292296            high_out_data.name = title 
    293  
    294             # find how to add this plot to the existing plot for low_extrapolate 
    295             # Plot the chart 
    296             title = "High-Q extrapolation" 
     297            high_out_data.title = title 
    297298 
    298299            # Add the plot to the model item 
  • src/sas/qtgui/Plotter.py

    r3bdbfcc rb789967  
    8282 
    8383        # Plot name 
    84         self.title(title=self.data.title) 
     84        if self.data.title: 
     85            self.title(title=self.data.title) 
     86        else: 
     87            self.title(title=self.data.name) 
    8588 
    8689        # Error marker toggle 
     
    134137        # Now add the legend with some customizations. 
    135138        self.legend = ax.legend(loc='upper right', shadow=True) 
    136         self.legend.set_picker(True) 
     139        if self.legend: 
     140            self.legend.set_picker(True) 
    137141 
    138142        # Current labels for axes 
     
    191195        for id in self.plot_dict.keys(): 
    192196            plot = self.plot_dict[id] 
    193             #name = plot.name 
    194             name = plot.title 
     197 
     198            name = plot.name if plot.name else plot.title 
    195199            plot_menu = self.contextMenu.addMenu('&%s' % name) 
    196200 
  • src/sas/qtgui/Plotter2D.py

    r3bdbfcc rb789967  
    201201        Remove all sclicers from the chart 
    202202        """ 
    203         if self.slicer: 
    204             self.slicer.clear() 
    205             self.canvas.draw() 
    206             self.slicer = None 
     203        if self.slicer is None: 
     204            return 
     205 
     206        self.slicer.clear() 
     207        self.canvas.draw() 
     208        self.slicer = None 
    207209 
    208210    def onEditSlicer(self): 
     
    215217         # Pass the model to the Slicer Parameters widget 
    216218        self.slicer_widget = SlicerParameters(self, model=self.param_model) 
     219        self.manager.parent.workspace().addWindow(self.slicer_widget) 
     220 
    217221        self.slicer_widget.show() 
    218222 
  • src/sas/qtgui/SlicerParameters.py

    • Property mode changed from 100755 to 100644
    r3bdbfcc rb789967  
    3030        # Disallow edit of the parameter name column. 
    3131        self.lstParams.model().setColumnReadOnly(0, True) 
     32 
     33        # Disable row number display 
     34        self.lstParams.verticalHeader().setVisible(False) 
    3235 
    3336        # Specify the validator on the parameter value column. 
     
    6871            editor = QtGui.QLineEdit(widget) 
    6972            validator = QtGui.QDoubleValidator() 
     73            # Don't use the scientific notation, cause 'e'. 
     74            validator.setNotation(QtGui.QDoubleValidator.StandardNotation) 
    7075            editor.setValidator(validator) 
    7176            return editor 
Note: See TracChangeset for help on using the changeset viewer.