Changeset c2f3ca2 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- Sep 7, 2018 10:20:46 AM (6 years ago)
- 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:
- f0365a2e
- Parents:
- fb560d2
- git-author:
- Piotr Rozyczko <rozyczko@…> (09/07/18 10:19:44)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (09/07/18 10:20:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r4ea8020 rc2f3ca2 1507 1507 # update charts 1508 1508 self.onPlot() 1509 #self.recalculatePlotData() 1510 1509 1511 1510 1512 # Read only value - we can get away by just printing it here … … 1594 1596 param_repr = GuiUtils.formatNumber(param_dict[param_name][0], high=True) 1595 1597 self._model_model.item(row, 1).setText(param_repr) 1598 self.kernel_module.setParam(param_name, param_dict[param_name][0]) 1596 1599 if self.has_error_column: 1597 1600 error_repr = GuiUtils.formatNumber(param_dict[param_name][1], high=True) … … 1635 1638 poly_item.insertColumn(2, [QtGui.QStandardItem("")]) 1636 1639 1637 # block signals temporarily, so we don't end up1638 # updating charts with every single model change on the end of fitting1639 self._model_model.blockSignals(True)1640 1641 1640 if not self.has_error_column: 1642 1641 # create top-level error column … … 1645 1644 self.iterateOverModel(createErrorColumn) 1646 1645 1647 # we need to enable signals for this, otherwise the final column mysteriously disappears (don't ask, I don't1648 # know)1649 self._model_model.blockSignals(False)1650 1646 self._model_model.insertColumn(2, error_column) 1651 self._model_model.blockSignals(True)1652 1647 1653 1648 FittingUtilities.addErrorHeadersToModel(self._model_model) … … 1658 1653 self.has_error_column = True 1659 1654 1655 # block signals temporarily, so we don't end up 1656 # updating charts with every single model change on the end of fitting 1657 self._model_model.itemChanged.disconnect() 1660 1658 self.iterateOverModel(updateFittedValues) 1661 1659 self.iterateOverModel(updatePolyValues) 1662 1663 self._model_model.blockSignals(False) 1660 self._model_model.itemChanged.connect(self.onMainParamsChange) 1664 1661 1665 1662 # Adjust the table cells width. … … 1696 1693 param_repr = GuiUtils.formatNumber(param_dict[param_name][0], high=True) 1697 1694 self._poly_model.item(row_i, 1).setText(param_repr) 1695 self.kernel_module.setParam(param_name, param_dict[param_name][0]) 1698 1696 if self.has_poly_error_column: 1699 1697 error_repr = GuiUtils.formatNumber(param_dict[param_name][1], high=True) 1700 1698 self._poly_model.item(row_i, 2).setText(error_repr) 1701 1702 1699 1703 1700 def createErrorColumn(row_i): … … 1720 1717 # block signals temporarily, so we don't end up 1721 1718 # updating charts with every single model change on the end of fitting 1722 self._poly_model. blockSignals(True)1719 self._poly_model.itemChanged.disconnect() 1723 1720 self.iterateOverPolyModel(updateFittedValues) 1724 self._poly_model. blockSignals(False)1721 self._poly_model.itemChanged.connect(self.onPolyModelChange) 1725 1722 1726 1723 if self.has_poly_error_column: … … 1732 1729 1733 1730 # switch off reponse to model change 1734 self._poly_model.blockSignals(True)1735 1731 self._poly_model.insertColumn(2, error_column) 1736 self._poly_model.blockSignals(False)1737 1732 FittingUtilities.addErrorPolyHeadersToModel(self._poly_model) 1738 1733 … … 1767 1762 param_repr = GuiUtils.formatNumber(param_dict[param_name][0], high=True) 1768 1763 self._magnet_model.item(row, 1).setText(param_repr) 1764 self.kernel_module.setParam(param_name, param_dict[param_name][0]) 1769 1765 if self.has_magnet_error_column: 1770 1766 error_repr = GuiUtils.formatNumber(param_dict[param_name][1], high=True) … … 1786 1782 # block signals temporarily, so we don't end up 1787 1783 # updating charts with every single model change on the end of fitting 1788 self._magnet_model. blockSignals(True)1784 self._magnet_model.itemChanged.disconnect() 1789 1785 self.iterateOverMagnetModel(updateFittedValues) 1790 self._magnet_model. blockSignals(False)1786 self._magnet_model.itemChanged.connect(self.onMagnetModelChange) 1791 1787 1792 1788 if self.has_magnet_error_column: … … 1798 1794 1799 1795 # switch off reponse to model change 1800 self._magnet_model.blockSignals(True)1801 1796 self._magnet_model.insertColumn(2, error_column) 1802 self._magnet_model.blockSignals(False)1803 1797 FittingUtilities.addErrorHeadersToModel(self._magnet_model) 1804 1798 … … 1812 1806 self.cmdPlot.setText("Show Plot") 1813 1807 # Force data recalculation so existing charts are updated 1808 self.showPlot() 1814 1809 self.recalculatePlotData() 1815 self.showPlot()1816 1810 1817 1811 def onSmearingOptionsUpdate(self):
Note: See TracChangeset
for help on using the changeset viewer.