mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
3767 Annotations. Feature for deleting annotations
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "RimAnnotationCollection.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimTextAnnotation.h"
|
||||
#include "RimReachCircleAnnotation.h"
|
||||
#include "RimPolylinesAnnotation.h"
|
||||
@@ -115,6 +117,20 @@ std::vector<RimPolylinesFromFileAnnotation*> RimAnnotationCollection::polylinesF
|
||||
return m_polylineFromFileAnnotations.childObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// At least one annotation have been deleted. Typically by the generic delete command
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimAnnotationCollection::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