From: mkr Date: Wed, 12 Mar 2008 06:13:47 +0000 (+0000) Subject: Fix for IPAL19178. X-Git-Tag: V5_0_0a1~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5eef1a6fdacc1bb228a09a0f8f433cac1e62d0f9;p=modules%2Fvisu.git Fix for IPAL19178. --- diff --git a/src/VVTK/VVTK_PickingDlg.cxx b/src/VVTK/VVTK_PickingDlg.cxx index 5e05ceac..76fead72 100644 --- a/src/VVTK/VVTK_PickingDlg.cxx +++ b/src/VVTK/VVTK_PickingDlg.cxx @@ -560,6 +560,19 @@ void VVTK_PickingDlg::onSelectionEvent() VISU::TLocalPntID aLocalPntID = aGaussPointID.second; myLocalPointLineEdit->setText( QString::number( aLocalPntID ) ); + + myPickingSettings->InvokeEvent( VISU::UpdatePickingSettingsEvent,NULL ); + + VISU::PGaussPtsIDMapper anIDMapper = aHelper.myPipeLine->GetGaussPtsIDMapper(); + vtkIdType anObjVtkId = anIDMapper->GetVTKID( VISU::TGaussPointID( aCellID, aLocalPntID ) ); + if ( anObjVtkId < 0 ) + return; + + aHelper.myMapIndex.Clear(); + aHelper.myMapIndex.Add( anObjVtkId ); + aHelper.mySelector->AddOrRemoveIndex( aHelper.myIO, aHelper.myMapIndex, false ); + aHelper.myActor->Highlight( aHelper.myIO ); + myInteractor->GetDevice()->CreateTimer( VTKI_TIMER_FIRST ); } VISU_PickingSettings* @@ -662,6 +675,27 @@ void VVTK_PickingDlg::onClickApply() void VVTK_PickingDlg::onClickClose() { + SelectorHelper aHelper( myInteractor ); + if ( !aHelper.get() ) + return; + + const TColStd_IndexedMapOfInteger& aMapIndex = aHelper.myMapIndex; + if ( aMapIndex.Extent() != 1 ) + return; + + int anObjId = aHelper.myMapIndex(1); + VISU::TGaussPointID aGaussPointID = aHelper.myPipeLine->GetObjID( anObjId ); + VISU::TCellID aCellID = aGaussPointID.first; + VISU::TLocalPntID aLocalPntID = aGaussPointID.second; + + VISU::PGaussPtsIDMapper anIDMapper = aHelper.myPipeLine->GetGaussPtsIDMapper(); + vtkIdType anObjVtkId = anIDMapper->GetVTKID( VISU::TGaussPointID( aCellID, aLocalPntID ) ); + if ( anObjVtkId < 0 ) + return; + + aHelper.myActor->Highlight( false ); + aHelper.myMapIndex.Clear(); + reject(); }