diff --git a/ApplicationCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.cpp b/ApplicationCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.cpp index c4c43cf438..f07b7c1f27 100644 --- a/ApplicationCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.cpp +++ b/ApplicationCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.cpp @@ -82,6 +82,14 @@ void RicCreateTextAnnotationFeature::setupActionLook(QAction* actionToSetup) //-------------------------------------------------------------------------------------------------- RimAnnotationCollectionBase* RicCreateTextAnnotationFeature::annotationCollectionBase() const { - auto selObjs = caf::selectedObjectsByTypeStrict(); - return selObjs.size() == 1 ? selObjs.front() : nullptr; + auto selColls = caf::selectedObjectsByTypeStrict(); + if (selColls.size() == 1) return selColls.front(); + + RimAnnotationCollectionBase* coll; + auto selGroupColl = caf::selectedObjectsByTypeStrict(); + if (selGroupColl.size() == 1) + { + selGroupColl.front()->firstAncestorOrThisOfType(coll); + } + return coll; }