Changeset 60a4e71 in sasview for src/sas/qtgui/Perspectives


Ignore:
Timestamp:
Sep 11, 2018 2:50:23 AM (6 years ago)
Author:
GitHub <noreply@…>
Parents:
343d7fd (diff), 8e674ccf (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.
git-author:
Ingo Breßler <dev@…> (09/11/18 02:50:23)
git-committer:
GitHub <noreply@…> (09/11/18 02:50:23)
Message:

Merge 8e674ccf5c2f4e357295344dc59f2796cd7de805 into 343d7fd60f1eda3abfbbd120c048168e649876be

Location:
src/sas/qtgui/Perspectives/Fitting
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    rf3cc979 r60a4e71  
    10881088            return True 
    10891089 
     1090    def updateDataVisibility(self, updateOnly): 
     1091        self.dataUpdateOnly = updateOnly 
     1092        for dataitem in self.all_data: 
     1093            data = GuiUtils.dataFromItem(dataitem) 
     1094            data.hidden = self.dataUpdateOnly 
     1095            self.updateModelIndex(data) 
     1096 
    10901097    def updateData(self): 
    10911098        """ 
     
    10931100        """ 
    10941101        # Update the chart 
     1102        self.updateDataVisibility(True) 
    10951103        if self.data_is_loaded: 
    10961104            self.cmdPlot.setText("Show Plot") 
     
    18151823        self.cmdPlot.setText("Show Plot") 
    18161824        # Force data recalculation so existing charts are updated 
    1817         self.showPlot() 
     1825#        self.showPlot() 
    18181826        # This is an important processEvent. 
    18191827        # This allows charts to be properly updated in order 
    18201828        # of plots being applied. 
    1821         QtWidgets.QApplication.processEvents() 
     1829#        QtWidgets.QApplication.processEvents() 
    18221830        self.recalculatePlotData() 
    18231831 
     
    22722280        Create a model or theory index with passed Data1D/Data2D 
    22732281        """ 
     2282        # set some flag which decides if new plots should be created or 
     2283        # just existing ones updated, selectively hiding indiv. plot will also work 
     2284        fitted_data.hidden = getattr(self, 'dataUpdateOnly', True) 
    22742285        if self.data_is_loaded: 
    22752286            if not fitted_data.name: 
     
    24422453        for plot in new_plots: 
    24432454            self.communicate.plotUpdateSignal.emit([plot]) 
     2455        # enable plots to be shown next time if updateData() wasn't called 
     2456        self.updateDataVisibility(False) 
    24442457 
    24452458    def complete2D(self, return_data): 
  • src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py

    r01b4877 rf3cc979  
    128128 
    129129            # Find param in volume_params 
    130             for p in parameters.form_volume_parameters: 
     130            poly_pars = parameters.form_volume_parameters 
     131            if is2D: 
     132                poly_pars += parameters.orientation_parameters 
     133            for p in poly_pars: 
    131134                if p.name != param.name: 
    132135                    continue 
  • src/sas/qtgui/Perspectives/Fitting/UnitTesting/FittingWidgetTest.py

    r4ea8020 rf712bf30  
    613613 
    614614        # Check that the number of rows increased 
     615        # (note that n == 1 by default in core_multi_shell so this increases index by 2) 
    615616        more_rows = self.widget._model_model.rowCount() - last_row 
    616         self.assertEqual(more_rows, 6) # 6 new rows: 2 params per index 
    617  
    618         # Back to 0 
     617        self.assertEqual(more_rows, 4) # 4 new rows: 2 params per index 
     618 
     619        # Set to 0 
    619620        self.widget.lstParams.indexWidget(func_index).setCurrentIndex(0) 
    620         self.assertEqual(self.widget._model_model.rowCount(), last_row) 
     621        self.assertEqual(self.widget._model_model.rowCount(), last_row - 2) # 2 fewer rows than default 
    621622 
    622623    def testPlotTheory(self): 
Note: See TracChangeset for help on using the changeset viewer.