diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2015-09-24 14:47:51 -0300 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2015-09-24 14:47:51 -0300 |
commit | 0ff5553653bbfd0e773970b78bee356543c2bf74 (patch) | |
tree | 8bbd17688afe9c5d3dbe84d4b1feb74496aac174 /selectionhandler.cpp | |
parent | d0aec5a4070c9140228ec6e17e22a99588e6d12d (diff) |
Updated selection handling code; implemented option to save subsample plot.
Diffstat (limited to 'selectionhandler.cpp')
-rw-r--r-- | selectionhandler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<int> &selection) { - arma::uvec newSelection(selection); + QSet<int> 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); |