3767 Annotations. Feature for deleting annotations

This commit is contained in:
Bjørn Erik Jensen
2018-11-27 15:44:00 +01:00
parent 08de39f15a
commit d138770a2a
13 changed files with 161 additions and 9 deletions
@@ -18,6 +18,9 @@
#include "RimAnnotationInViewCollection.h"
#include "RiaApplication.h"
#include "RimProject.h"
#include "RimGridView.h"
#include "RimTextAnnotation.h"
@@ -53,6 +56,20 @@ void RimAnnotationInViewCollection::addAnnotation(RimTextAnnotation* annotation)
m_textAnnotations.push_back(annotation);
}
//--------------------------------------------------------------------------------------------------
/// At least one annotation have been deleted. Typically by the generic delete command
//--------------------------------------------------------------------------------------------------
void RimAnnotationInViewCollection::onAnnotationDeleted()
{
auto project = RiaApplication::instance()->project();
std::vector<RimGridView*> views;
project->allVisibleGridViews(views);
for (auto& view : views)
{
if (view->annotationCollection()->isActive()) view->scheduleCreateDisplayModelAndRedraw();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------