diff --git a/Code/Mantid/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FitPropertyBrowser.h b/Code/Mantid/MantidQt/MantidWidgets/inc/MantidQtMantidWidgets/FitPropertyBrowser.h
index eff7bd9..9a3ed52 100644
|
a
|
b
|
public: |
| 208 | 208 | /// Returns true if the fit should be done against binned (bunched) data. |
| 209 | 209 | bool rawData()const; |
| 210 | 210 | |
| | 211 | void setADSObserveEnabled(bool enabled); |
| | 212 | |
| 211 | 213 | void postDeleteHandle(const std::string& wsName); |
| 212 | 214 | void addHandle(const std::string& wsName,const boost::shared_ptr<Mantid::API::Workspace> ws); |
| 213 | 215 | |
diff --git a/Code/Mantid/MantidQt/MantidWidgets/src/FitPropertyBrowser.cpp b/Code/Mantid/MantidQt/MantidWidgets/src/FitPropertyBrowser.cpp
index bb232ae..951dd72 100644
|
a
|
b
|
void FitPropertyBrowser::showEvent(QShowEvent* e) |
| 1666 | 1666 | (void)e; |
| 1667 | 1667 | // Observe what workspaces are added and deleted unless it's a custom fitting, all workspaces for custom fitting (eg muon analysis) |
| 1668 | 1668 | // should be manually added. |
| 1669 | | observeAdd(); |
| 1670 | | observePostDelete(); |
| | 1669 | setADSObserveEnabled(true); |
| 1671 | 1670 | populateWorkspaceNames(); |
| 1672 | 1671 | } |
| 1673 | 1672 | |
| … |
… |
void FitPropertyBrowser::showEvent(QShowEvent* e) |
| 1677 | 1676 | void FitPropertyBrowser::hideEvent(QHideEvent* e) |
| 1678 | 1677 | { |
| 1679 | 1678 | (void)e; |
| 1680 | | observeAdd(false); |
| 1681 | | observePostDelete(false); |
| | 1679 | setADSObserveEnabled(false); |
| | 1680 | } |
| | 1681 | |
| | 1682 | void FitPropertyBrowser::setADSObserveEnabled(bool enabled) |
| | 1683 | { |
| | 1684 | observeAdd(enabled); |
| | 1685 | observePostDelete(enabled); |
| 1682 | 1686 | } |
| 1683 | 1687 | |
| 1684 | 1688 | /// workspace was added |
| … |
… |
void FitPropertyBrowser::addHandle(const std::string& wsName,const boost::shared |
| 1688 | 1692 | QStringList oldWorkspaces = m_workspaceNames; |
| 1689 | 1693 | QString oldName = QString::fromStdString(workspaceName()); |
| 1690 | 1694 | int i = m_workspaceNames.indexOf(QString(wsName.c_str())); |
| | 1695 | |
| | 1696 | bool initialSignalsBlocked = m_enumManager->signalsBlocked(); |
| | 1697 | |
| 1691 | 1698 | // if new workspace append this workspace name |
| 1692 | 1699 | if (i < 0) |
| 1693 | 1700 | { |
| | 1701 | if (!m_workspaceNames.isEmpty()) |
| | 1702 | { |
| | 1703 | m_enumManager->blockSignals(true); |
| | 1704 | } |
| | 1705 | |
| 1694 | 1706 | m_workspaceNames.append(QString(wsName.c_str())); |
| 1695 | 1707 | m_workspaceNames.sort(); |
| 1696 | 1708 | m_enumManager->setEnumNames(m_workspace, m_workspaceNames); |
| … |
… |
void FitPropertyBrowser::addHandle(const std::string& wsName,const boost::shared |
| 1701 | 1713 | { |
| 1702 | 1714 | m_enumManager->setValue(m_workspace,i); |
| 1703 | 1715 | } |
| | 1716 | |
| | 1717 | m_enumManager->blockSignals(initialSignalsBlocked); |
| | 1718 | /* |
| 1704 | 1719 | if (m_workspaceNames.size() == 1) |
| 1705 | 1720 | { |
| 1706 | 1721 | setWorkspaceName(QString::fromStdString(wsName)); |
| 1707 | 1722 | } |
| 1708 | | getHandler()->updateWorkspaces(oldWorkspaces); |
| | 1723 | */ |
| 1709 | 1724 | } |
| 1710 | 1725 | |
| 1711 | 1726 | /// workspace was removed |
| … |
… |
void FitPropertyBrowser::postDeleteHandle(const std::string& wsName) |
| 1718 | 1733 | { |
| 1719 | 1734 | m_workspaceNames.removeAt(i); |
| 1720 | 1735 | } |
| | 1736 | |
| | 1737 | bool initialSignalsBlocked = m_enumManager->signalsBlocked(); |
| | 1738 | |
| | 1739 | if (QString::fromStdString(wsName) != oldName) |
| | 1740 | { |
| | 1741 | m_enumManager->blockSignals(true); |
| | 1742 | } |
| | 1743 | |
| 1721 | 1744 | m_enumManager->setEnumNames(m_workspace, m_workspaceNames); |
| | 1745 | |
| 1722 | 1746 | i = m_workspaceNames.indexOf(oldName); |
| 1723 | 1747 | if (i >= 0) |
| 1724 | 1748 | { |
| 1725 | 1749 | m_enumManager->setValue(m_workspace,i); |
| 1726 | 1750 | } |
| 1727 | | getHandler()->updateWorkspaces(oldWorkspaces); |
| | 1751 | |
| | 1752 | m_enumManager->blockSignals(initialSignalsBlocked); |
| 1728 | 1753 | } |
| 1729 | 1754 | |
| 1730 | 1755 | |