diff --git a/src/TNaming/TNaming_Name.cxx b/src/TNaming/TNaming_Name.cxx index a38e6e81fc..7caca2eb26 100644 --- a/src/TNaming/TNaming_Name.cxx +++ b/src/TNaming/TNaming_Name.cxx @@ -308,7 +308,7 @@ TopAbs_ShapeEnum TNaming_Name::ShapeType() const } //======================================================================= -//function : Append +//function : Paste //purpose : //======================================================================= @@ -317,7 +317,8 @@ void TNaming_Name::Paste (TNaming_Name& into, { into.myType = myType; into.myShapeType = myShapeType; - into.myShape = myShape; + into.myShape = myShape; + into.myIndex = myIndex; into.myArgs.Clear(); // into.myOrientation = myOrientation; Handle(TNaming_NamedShape) NS; diff --git a/tests/bugs/caf/bug24822 b/tests/bugs/caf/bug24822 new file mode 100644 index 0000000000..bd33b9bbbe --- /dev/null +++ b/tests/bugs/caf/bug24822 @@ -0,0 +1,23 @@ +puts "==========" +puts "OCC24822" +puts "==========" +puts "" +################################################### +# Solve selection fails after copying +################################################### + +restore [locate_data_file bug24822_face.brep] f +explode f w + +NewDocument D XmlOcaf +ImportShape D 0:1 f +SelectShape D 0:2 f_1 f +SolveSelection D 0:2 + +CopyLabel D 0:2 0:3 + +if [catch { SolveSelection D 0:3 } ] { + puts "Error: Solve selection fails after copying" +} else { + puts "OK: Solve selection is good after copying" +}