From 0ff5553653bbfd0e773970b78bee356543c2bf74 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Thu, 24 Sep 2015 14:47:51 -0300 Subject: Updated selection handling code; implemented option to save subsample plot. --- selectionhandler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'selectionhandler.cpp') diff --git a/selectionhandler.cpp b/selectionhandler.cpp index 4c488a0..44eef28 100644 --- a/selectionhandler.cpp +++ b/selectionhandler.cpp @@ -5,14 +5,14 @@ SelectionHandler::SelectionHandler(const arma::uvec &sampleIndices) { } -void SelectionHandler::setSelection(const arma::uvec &selection) +void SelectionHandler::setSelection(const QSet &selection) { - arma::uvec newSelection(selection); + QSet newSelection; // The selecion happens over the sample indices. We use the original dataset // indices in sampleIndices to translate indices. - for (auto it = newSelection.begin(); it != newSelection.end(); it++) { - *it = m_sampleIndices[*it]; + for (auto it = selection.begin(); it != selection.end(); it++) { + newSelection.insert(m_sampleIndices[*it]); } emit selectionChanged(newSelection); -- cgit v1.2.3