aboutsummaryrefslogtreecommitdiff
path: root/selectionhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'selectionhandler.cpp')
-rw-r--r--selectionhandler.cpp8
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);