From 617347baf17d4416e598a5ce6c92024541bb1e2a Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Tue, 14 Apr 2015 16:50:24 +0100 Subject: [PATCH] Resize algorithm history list on update Better default sizes Refs #2089 --- .../src/Mantid/AlgorithmHistoryWindow.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Code/Mantid/MantidPlot/src/Mantid/AlgorithmHistoryWindow.cpp b/Code/Mantid/MantidPlot/src/Mantid/AlgorithmHistoryWindow.cpp index 4e53e73fa6ec..456acf844492 100644 --- a/Code/Mantid/MantidPlot/src/Mantid/AlgorithmHistoryWindow.cpp +++ b/Code/Mantid/MantidPlot/src/Mantid/AlgorithmHistoryWindow.cpp @@ -208,8 +208,8 @@ m_wsName(wsptr->getName().c_str()), m_view(wsptr->getHistory().createView()) // The tree and the history details layout QHBoxLayout *treeLayout = new QHBoxLayout; - treeLayout->addWidget(m_Historytree,1); // History stretches 1 - treeLayout->addWidget(m_histPropWindow->m_histpropTree,2); // Properties gets more space + treeLayout->addWidget(m_Historytree,3); // History stretches 1 + treeLayout->addWidget(m_histPropWindow->m_histpropTree,5); // Properties gets more space //Create a GroupBox to display exec date,duration if(!m_execSumGrpBox)m_execSumGrpBox=createExecSummaryGrpBox(); @@ -499,9 +499,10 @@ void AlgHistoryProperties::displayAlgHistoryProperties() }// end of properties for loop - m_histpropTree->resizeColumnToContents(0); - m_histpropTree->resizeColumnToContents(2); - m_histpropTree->resizeColumnToContents(3); + // Fit some column widths to data + m_histpropTree->resizeColumnToContents(0); // Property name + m_histpropTree->resizeColumnToContents(2); // Default + m_histpropTree->resizeColumnToContents(3); // Direction } //-------------------------------------------------------------------------------------------------- @@ -613,6 +614,8 @@ void AlgHistoryTreeWidget::populateAlgHistoryTreeWidget(const WorkspaceHistory& this->addTopLevelItem(item); populateNestedHistory(item, *algHistIter); } + resizeColumnToContents(0); // Algorithm name + resizeColumnToContents(1); // Unroll this->blockSignals(false); }