From: apo Date: Mon, 27 Nov 2006 09:48:55 +0000 (+0000) Subject: Customize SameAs for case when we copy (not create) presentation X-Git-Tag: WP1_2_3_05-12-2006_cache_system~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=640bdf5dc6aa30a14f448d8f878984c71b99a5ec;p=modules%2Fvisu.git Customize SameAs for case when we copy (not create) presentation --- diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 0c382e1b..621a968f 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -126,16 +126,16 @@ bool VISU::ColoredPrs3d_i ::OnSetInput() { - bool anIsNotCreated = !IsPipeLineExists(); - if(anIsNotCreated) + bool anIsCreatNew = !IsPipeLineExists(); + if(anIsCreatNew) CreatePipeLine(NULL); // to create proper pipeline - DoSetInput(anIsNotCreated); + DoSetInput(anIsCreatNew); // To update title according to the new input SetTitle(GetCTitle().c_str()); - return anIsNotCreated; + return anIsCreatNew; } @@ -396,7 +396,8 @@ VISU::ColoredPrs3d_i if(const ColoredPrs3d_i* aPrs3d = dynamic_cast(theOrigin)){ ColoredPrs3d_i* anOrigin = const_cast(aPrs3d); - if(OnSetInput()) + bool anIsCreatNew = OnSetInput(); + if(anIsCreatNew) Build(ESameAs); TSuperClass::SameAs(theOrigin); @@ -408,7 +409,8 @@ VISU::ColoredPrs3d_i SetPosition(anOrigin->GetPosX(), anOrigin->GetPosY()); SetSize(anOrigin->GetWidth(), anOrigin->GetHeight()); SetLabels(anOrigin->GetLabels()); - SetTitle(anOrigin->GetTitle()); + if(anIsCreatNew) + SetTitle(anOrigin->GetTitle()); SetBoldTitle(anOrigin->IsBoldTitle()); SetItalicTitle(anOrigin->IsItalicTitle());