Fixed missing selection of well path in project tree when clicking on a well path in 3D view

This commit is contained in:
Magne Sjaastad 2015-12-16 09:45:56 +01:00
parent fc7721dc20
commit 0a15ccf577
3 changed files with 2 additions and 22 deletions

View File

@ -82,6 +82,8 @@ bool RicWellPathViewerEventHandler::handleEvent(cvf::Object* eventObject)
RiuMainWindow::instance()->setResultInfo(wellPathText); RiuMainWindow::instance()->setResultInfo(wellPathText);
RiuMainWindow::instance()->selectAsCurrentItem(wellPathSourceInfo->wellPath());
return true; return true;
} }
} }

View File

@ -456,8 +456,6 @@ void RiuViewerCommands::handlePickAction(int winPosX, int winPosY, Qt::KeyboardM
return; return;
} }
} }
updateSelectionFromPickedPart(firstHitPart);
} }
if (firstHitPart && firstHitPart->sourceInfo()) if (firstHitPart && firstHitPart->sourceInfo())
@ -706,25 +704,6 @@ void RiuViewerCommands::ijkFromCellIndex(size_t gridIdx, size_t cellIndex, size
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuViewerCommands::updateSelectionFromPickedPart(cvf::Part* part)
{
if (part && part->sourceInfo())
{
const RivWellPathSourceInfo* wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(part->sourceInfo());
if (wellPathSourceInfo)
{
RimWellPath* wellPath = wellPathSourceInfo->wellPath();
if (wellPath)
{
RiuMainWindow::instance()->selectAsCurrentItem(wellPath);
}
}
}
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -68,7 +68,6 @@ private:
void ijkFromCellIndex(size_t gridIdx, size_t cellIndex, size_t* i, size_t* j, size_t* k); void ijkFromCellIndex(size_t gridIdx, size_t cellIndex, size_t* i, size_t* j, size_t* k);
void createSliceRangeFilter(int ijOrk); void createSliceRangeFilter(int ijOrk);
void extractIntersectionData(const cvf::HitItemCollection& hitItems, cvf::Vec3d* localIntersectionPoint, cvf::Part** firstPart, uint* firstPartFaceHit, cvf::Part** nncPart, uint* nncPartFaceHit); void extractIntersectionData(const cvf::HitItemCollection& hitItems, cvf::Vec3d* localIntersectionPoint, cvf::Part** firstPart, uint* firstPartFaceHit, cvf::Part** nncPart, uint* nncPartFaceHit);
void updateSelectionFromPickedPart(cvf::Part* part);
bool handleOverlayItemPicking(int winPosX, int winPosY); bool handleOverlayItemPicking(int winPosX, int winPosY);