(#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:
Magne Sjaastad
2015-12-07 09:59:19 +01:00
parent e65facd590
commit a2bfc12c57
8 changed files with 122 additions and 15 deletions

View File

@@ -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);
}

View File

@@ -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