return anIsOk;
}
-void VisuGUI_DeformedShapeDlg::updatePrsCopy()
+void VisuGUI_DeformedShapeDlg::updatePrsCopy( VISU::Prs3d_i* thePrs )
{
SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
VisuGUI* aVisuGUI = dynamic_cast <VisuGUI*>(myModule);
if ( myPrsCopy->GetNumberOfActors() == 0 ) {
PublishInView(aVisuGUI, myPrsCopy, aViewWindow);
+
+ // Bug 0020821
+ if( thePrs ) {
+ if( SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>( myModule ) ) {
+ VISU_Actor* anActorSource = VISU::FindActor( aViewWindow, thePrs );
+ VISU_Actor* anActorCopy = VISU::FindActor( aViewWindow, myPrsCopy );
+ if( anActorSource && anActorCopy )
+ anActorCopy->DeepCopy( anActorSource );
+ }
+ }
+
if(VISU::GetResourceMgr()->booleanValue("VISU","automatic_fit_all",false))
aViewWindow->onFitAll();
int aPos = VISU::GetFreePositionOfDefaultScalarBar(aVisuGUI, aViewWindow);
{
if ( storeToPrsObject( myPrsCopy ) )
{
- updatePrsCopy();
+ updatePrsCopy( myPrsCopy );
isApplyed = true;
return true;
}
if (TPrs3d_i* aPrs3d = dynamic_cast<TPrs3d_i*>(thePrs3d)) {
VisuGUI_DeformedShapeDlg* aDlg = new VisuGUI_DeformedShapeDlg (theModule);
aDlg->initFromPrsObject(aPrs3d, true);
- aDlg->updatePrsCopy();
+ aDlg->updatePrsCopy(thePrs3d);
//Hide thePrs3d from Viewer
SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(theModule);
anActor->VisibilityOff();
VisuGUI_DialogRunner r(aDlg);
- int dlgResult = r.run( false );
+ int dlgResult = r.run( true );
if ( dlgResult != 0 )
aDlg->storeToPrsObject( aPrs3d );