mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#674) Clicking on items in 3D view selects corresponding item in tree view/property panel
Clicking on 3D Info box and legends for cell result, separate fault result and cell edge selects corresponding items in tree view
This commit is contained in:
@@ -908,3 +908,16 @@ void caf::Viewer::appendAllStaticModelsToFrame(cvf::Scene* scene)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::OverlayItem* caf::Viewer::overlayItem(int winPosX, int winPosY)
|
||||
{
|
||||
if (m_mainRendering.isNull()) return NULL;
|
||||
|
||||
int translatedMousePosX = winPosX;
|
||||
int translatedMousePosY = height() - winPosY;
|
||||
|
||||
return m_mainRendering->overlayItemFromWindowCoordinates(translatedMousePosX, translatedMousePosY);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace cvf {
|
||||
class Rendering;
|
||||
class Scene;
|
||||
class TextureImage;
|
||||
class OverlayItem;
|
||||
}
|
||||
|
||||
namespace caf {
|
||||
@@ -123,6 +124,7 @@ public:
|
||||
bool canRender() const;
|
||||
|
||||
bool rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pickedPoints) ;
|
||||
cvf::OverlayItem* overlayItem(int winPosX, int winPosY);
|
||||
|
||||
// QPainter based drawing on top of the OpenGL graphics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user