mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
3767 Annotations. Feature for deleting annotations
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user