projects
/
occt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d1e872
)
0028463: OCAF loses an interactive object after copying
author
vro
<vro@opencascade.com>
Thu, 16 Feb 2017 13:03:56 +0000
(16:03 +0300)
committer
bugmaster
<bugmaster@opencascade.com>
Thu, 2 Mar 2017 09:31:51 +0000
(12:31 +0300)
src/TPrsStd/TPrsStd_AISPresentation.cxx
patch
|
blob
|
blame
|
history
diff --git
a/src/TPrsStd/TPrsStd_AISPresentation.cxx
b/src/TPrsStd/TPrsStd_AISPresentation.cxx
index
5745080
..
f64a36a
100644
(file)
--- a/
src/TPrsStd/TPrsStd_AISPresentation.cxx
+++ b/
src/TPrsStd/TPrsStd_AISPresentation.cxx
@@
-640,6
+640,18
@@
void TPrsStd_AISPresentation::Paste (const Handle(TDF_Attribute)& theInto,
Handle(TPrsStd_AISPresentation)::DownCast(theInto);
anInto->Backup();
Handle(TPrsStd_AISPresentation)::DownCast(theInto);
anInto->Backup();
+ if (!anInto->myAIS.IsNull())
+ {
+ // Save displayed flag.
+ Standard_Boolean displayed = anInto->IsDisplayed();
+ // Erase the interactive object.
+ anInto->AISErase(Standard_True);
+ // Restore the displayed flag.
+ if (displayed)
+ anInto->SetDisplayed(displayed);
+ }
+ // Nullify the interactive object.
+ // It will be restored on the next call to AISUpdate().
anInto->myAIS.Nullify();
}
anInto->myAIS.Nullify();
}