From: apo Date: Thu, 22 Nov 2007 13:27:08 +0000 (+0000) Subject: Fix for Bug IPAL17668 X-Git-Tag: mergefrom_MERGE_MULTIPR_EVOLUTION_07-Dec-07~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b1585ae2522eefd50c83c506df0c50d07f0290af;p=modules%2Fvisu.git Fix for Bug IPAL17668 TC71: REGR: copy object leads to fatal error and unknown exception --- diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 0bd5b847..bfb32d0d 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -1817,31 +1817,31 @@ VisuGUI VISU::ColoredPrs3d_i* aColoredPrs3d = dynamic_cast(aBase); switch (aBase->GetType()) { case VISU::TSCALARMAP: - TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp); + TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp, false); break; case VISU::TDEFORMEDSHAPE: - TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp); + TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp, false); break; case VISU::TSCALARMAPONDEFORMEDSHAPE: - TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp); + TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp, false); break; case VISU::TCUTPLANES: - TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp); + TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp, false); break; case VISU::TCUTLINES: - TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp); + TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp, false); break; case VISU::TISOSURFACES: - TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp); + TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp, false); break; case VISU::TSTREAMLINES: - TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp); + TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp, false); break; case VISU::TVECTORS: - TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp); + TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp, false); break; case VISU::TPLOT3D: - TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp); + TSameAsFactory().Create(aColoredPrs3d, ColoredPrs3d_i::EPublishUnderTimeStamp, false); break; } UpdateObjBrowser(this); diff --git a/src/VISU_I/VISU_ColoredPrs3dFactory.hh b/src/VISU_I/VISU_ColoredPrs3dFactory.hh index 1852297c..eae438dd 100644 --- a/src/VISU_I/VISU_ColoredPrs3dFactory.hh +++ b/src/VISU_I/VISU_ColoredPrs3dFactory.hh @@ -287,11 +287,13 @@ namespace VISU SALOME::GenericObjPtr Create(ColoredPrs3d_i* theColoredPrs3d, - ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode) + ColoredPrs3d_i::EPublishInStudyMode thePublishInStudyMode, + bool theCreateAsTemporalObject = true) { SALOME::GenericObjPtr aSameColoredPrs3d(new TColoredPrs3d(thePublishInStudyMode)); Copy(theColoredPrs3d, aSameColoredPrs3d); - aSameColoredPrs3d->Destroy(); + if ( theCreateAsTemporalObject ) + aSameColoredPrs3d->Destroy(); return aSameColoredPrs3d; } };