Changeset c20d163 in sasview for src


Ignore:
Timestamp:
Sep 8, 2018 4:28:54 AM (6 years ago)
Author:
Torin Cooper-Bennun <torin.cooper-bennun@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
c0de493
Parents:
bfb5d9e (diff), 0cd98a1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ESS_GUI' of https://github.com/SasView/sasview into ESS_GUI

Location:
src/sas/qtgui
Files:
5 edited

Legend:

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

    r50cafe7 r0cd98a1  
    598598        plot2D.plot(plot_set) 
    599599        self.addPlot(plot2D) 
    600         self.active_plots[plot2D.data.id] = plot2D 
     600        self.active_plots[plot2D.data.name] = plot2D 
    601601        #============================================ 
    602602        # Experimental hook for silx charts 
     
    626626                new_plot.plot(plot_set, transform=transform) 
    627627                # active_plots may contain multiple charts 
    628                 self.active_plots[plot_set.id] = new_plot 
     628                self.active_plots[plot_set.name] = new_plot 
    629629            elif isinstance(plot_set, Data2D): 
    630630                self.addDataPlot2D(plot_set, item) 
     
    697697                old_plot.plot() 
    698698                # need this for lookup - otherwise this plot will never update 
    699                 self.active_plots[plot_set.id] = old_plot 
     699                self.active_plots[plot_set.name] = old_plot 
    700700 
    701701    def updatePlot(self, data): 
     
    711711 
    712712        ids_keys = list(self.active_plots.keys()) 
    713         ids_vals = [val.data.id for val in self.active_plots.values()] 
    714  
    715         data_id = data.id 
     713        ids_vals = [val.data.name for val in self.active_plots.values()] 
     714 
     715        data_id = data.name 
    716716        if data_id in ids_keys: 
    717717            self.active_plots[data_id].replacePlot(data_id, data) 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    rc4b23dd r0cd98a1  
    18141814        # Force data recalculation so existing charts are updated 
    18151815        self.showPlot() 
     1816        # This is an important processEvent. 
     1817        # This allows charts to be properly updated in order 
     1818        # of plots being applied. 
     1819        QtWidgets.QApplication.processEvents() 
    18161820        self.recalculatePlotData() 
    18171821 
  • src/sas/qtgui/Plotting/Plotter.py

    r2a174d4 r0cd98a1  
    182182 
    183183        # Update the list of data sets (plots) in chart 
    184         self.plot_dict[self._data.id] = self.data 
    185  
    186         self.plot_lines[self._data.id] = line 
     184        self.plot_dict[self._data.name] = self.data 
     185 
     186        self.plot_lines[self._data.name] = line 
    187187 
    188188        # Now add the legend with some customizations. 
     
    201201        # refresh canvas 
    202202        self.canvas.draw() 
    203         # This is an important processEvent. 
    204         # This allows charts to be properly updated in order 
    205         # of plots being applied. 
    206         QtWidgets.QApplication.processEvents() 
    207203 
    208204    def createContextMenu(self): 
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingLogicTest.py

    re752ab8 rbfb5d9e  
    9999        data.name = "boop" 
    100100        data.id = "poop" 
    101         return_data = (data.x,data.y, 7, None, None, 
    102                        0, True, 0.0, 1, data, 
    103                        data, False, None, 
    104                        None, None, None, 
    105                        None, None) 
     101        # Condensed return data (new1DPlot only uses these fields) 
     102        return_data = dict(x = data.x, 
     103                           y = data.y, 
     104                           model = data, 
     105                           data = data) 
     106        # return_data = (data.x,data.y, 7, None, None, 
     107        #                0, True, 0.0, 1, data, 
     108        #                data, False, None, 
     109        #                None, None, None, 
     110        #                None, None) 
    106111 
    107112        new_plot = self.logic.new1DPlot(return_data=return_data, tab_id=0) 
     
    139144        qmin, qmax, npts = self.logic.computeDataRange() 
    140145 
    141         return_data = (x_0, data, 7, data, None, 
    142                         True, 0.0, 1, 0, qmin, qmax, 
    143                         0.1, False, None) 
     146        # Condensed return data (new2DPlot only uses these fields) 
     147        return_data = dict(image = x_0, 
     148                           data = data, 
     149                           page_id = 7, 
     150                           model = data) 
     151        # return_data = (x_0, data, 7, data, None, 
     152        #                 True, 0.0, 1, 0, qmin, qmax, 
     153        #                 0.1, False, None) 
    144154 
    145155        new_plot = self.logic.new2DPlot(return_data=return_data) 
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingOptionsTest.py

    r725d9c06 rbfb5d9e  
    3838        # The combo box 
    3939        self.assertIsInstance(self.widget.cbAlgorithm, QtWidgets.QComboBox) 
    40         self.assertEqual(self.widget.cbAlgorithm.count(), 5) 
     40        self.assertEqual(self.widget.cbAlgorithm.count(), 6) 
    4141        self.assertEqual(self.widget.cbAlgorithm.itemText(0), 'Nelder-Mead Simplex') 
    4242        self.assertEqual(self.widget.cbAlgorithm.itemText(4), 'Levenberg-Marquardt') 
Note: See TracChangeset for help on using the changeset viewer.