]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Customize SameAs for case when we copy (not create) presentation
authorapo <apo@opencascade.com>
Mon, 27 Nov 2006 09:48:55 +0000 (09:48 +0000)
committerapo <apo@opencascade.com>
Mon, 27 Nov 2006 09:48:55 +0000 (09:48 +0000)
src/VISU_I/VISU_ColoredPrs3d_i.cc

index 0c382e1b6975df926f0d7492d014e575c8aefa4f..621a968f2e0e9a6c371e8b6f533b56d4f8afc1bc 100644 (file)
@@ -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<const ColoredPrs3d_i*>(theOrigin)){
     ColoredPrs3d_i* anOrigin = const_cast<ColoredPrs3d_i*>(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());