Commit 3d4b61ed authored by Yumin Yuan's avatar Yumin Yuan
Browse files

Made modelsOfSession method in SubphraseGenerator skip duplicates

parent 468c8e04
......@@ -304,7 +304,9 @@ void SubphraseGenerator::prototypeOfInstance(
void SubphraseGenerator::modelsOfSession(
DescriptivePhrase::Ptr src, const SessionRef& sess, DescriptivePhrases& result)
Models modelsOf = sess.models<Models>();
// We need the models to be unique, no duplicated entries.
std::set<smtk::model::Model> modelsOf =
sess.models< std::set<smtk::model::Model> >();
addEntityPhrases(modelsOf, src, this->directLimit(), result);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment