From 640bdf5dc6aa30a14f448d8f878984c71b99a5ec Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 27 Nov 2006 09:48:55 +0000 Subject: [PATCH] Customize SameAs for case when we copy (not create) presentation --- src/VISU_I/VISU_ColoredPrs3d_i.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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()); -- 2.39.2