#3757 Add selection of text annotations by picking

This commit is contained in:
Jacob Støren
2018-12-03 10:53:40 +01:00
parent e984b06ea6
commit a13201e42e
4 changed files with 98 additions and 52 deletions

View File

@@ -1,7 +1,6 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
// Copyright (C) 2018- equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -19,15 +18,13 @@
#include "RivTextAnnotationSourceInfo.h"
#include "RimEclipseView.h"
#include "RimAnnotationInViewCollection.h"
#include "RimTextAnnotation.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivTextAnnotationSourceInfo::RivTextAnnotationSourceInfo(RimTextAnnotation* annotation)
: m_annotation(annotation)
: RivObjectSourceInfo(annotation)
{
}
@@ -36,5 +33,5 @@ RivTextAnnotationSourceInfo::RivTextAnnotationSourceInfo(RimTextAnnotation* anno
//--------------------------------------------------------------------------------------------------
RimTextAnnotation* RivTextAnnotationSourceInfo::annotation() const
{
return m_annotation.p();
return dynamic_cast<RimTextAnnotation*>( this->object() );
}

View File

@@ -1,7 +1,6 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
// Copyright (C) 2018- equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -19,14 +18,11 @@
#pragma once
#include "cvfBase.h"
#include "cvfObject.h"
#include "cafPdmPointer.h"
#include "RivObjectSourceInfo.h"
//class RimAnnotationInView;
class RimTextAnnotation;
class RivTextAnnotationSourceInfo : public cvf::Object
class RivTextAnnotationSourceInfo : public RivObjectSourceInfo
{
public:
RivTextAnnotationSourceInfo(RimTextAnnotation* annotation);