Skip to content

Commit

Permalink
Refs #8550. Human-readable ranges when loading from nexus.
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbekasov committed Dec 10, 2013
1 parent 522aaa9 commit 76c7b7e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
Expand Up @@ -3630,9 +3630,13 @@ void MuonAnalysis::setGrouping(ITableWorkspace_sptr detGroupingTable)
{
for ( size_t row = 0; row < detGroupingTable->rowCount(); ++row )
{
const std::vector<int>& detectors = detGroupingTable->cell< std::vector<int> >(row,0);
std::vector<int> detectors = detGroupingTable->cell< std::vector<int> >(row,0);

const std::string& detectorRange = Strings::join(detectors.begin(), detectors.end(), ",");
// toString() expects the sequence to be sorted
std::sort( detectors.begin(), detectors.end() );

// Convert to a range string, i.e. 1-5,6-8,9
const std::string& detectorRange = Strings::toString(detectors);

m_uiForm.groupTable->setItem( static_cast<int>(row), 0,
new QTableWidgetItem( QString::number(row + 1) ) );
Expand Down

0 comments on commit 76c7b7e

Please sign in to comment.