return 0;
}
+#include <AppStdL_Application.hxx>
+#include <TDocStd_Application.hxx>
+#include <TDataStd_Integer.hxx>
+#include <TDF_AttributeIterator.hxx>
+//=======================================================================
+//function : OCC24755
+//purpose :
+//=======================================================================
+static Standard_Integer OCC24755 (Draw_Interpretor& di, Standard_Integer n, const char** a)
+{
+ if (n != 1)
+ {
+ std::cout << "Usage : " << a[0] << "\n";
+ return 1;
+ }
+
+ Handle(TDocStd_Application) anApp = new AppStdL_Application;
+ Handle(TDocStd_Document) aDoc;
+ anApp->NewDocument ("MDTV-Standard", aDoc);
+ TDF_Label aLab = aDoc->Main();
+ TDataStd_Integer::Set (aLab, 0);
+ TDataStd_Name::Set (aLab, "test");
+
+ TDF_AttributeIterator i (aLab);
+ Handle(TDF_Attribute) anAttr = i.Value();
+ QCOMPARE (anAttr->IsKind (STANDARD_TYPE (TDataStd_Integer)), Standard_True);
+ i.Next();
+ anAttr = i.Value();
+ QCOMPARE (anAttr->IsKind (STANDARD_TYPE (TDataStd_Name)), Standard_True);
+
+ return 0;
+}
+
void QABugs::Commands_19(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
theCommands.Add ("OCC24622", "OCC24622 texture={1D|2D}\n Tests sourcing of 1D/2D pixmaps for AIS_TexturedShape", __FILE__, OCC24622, group);
theCommands.Add ("OCC24667", "OCC24667 result Wire_spine Profile [Mode [Approx]], no args to get help", __FILE__, OCC24667, group);
theCommands.Add ("OCC24565", "OCC24565 FileNameIGS FileNameSTOR", __FILE__, OCC24565, group);
+ theCommands.Add ("OCC24755", "OCC24755", __FILE__, OCC24755, group);
return;
}
anAttribute->myTransaction = toNode->Data()->Transaction(); /// myData->Transaction();
anAttribute->mySavedTransaction = 0;
+
+ //append to the end of the attribute list
dummyAtt.Nullify();
+ for (TDF_AttributeIterator itr (toNode); itr.More(); itr.Next())
+ dummyAtt = itr.Value();
+
toNode->AddAttribute(dummyAtt,anAttribute);
toNode->AttributesModified(anAttribute->myTransaction != 0);
//if (myData->NotUndoMode()) anAttribute->AfterAddition();
TPrsStd_AISViewer::Update(aLab);
aContext->Display(aTriShape, Standard_True);
- Handle(TDocStd_Owner) owner;
- if (aD1->Main().Root().FindAttribute(TDocStd_Owner::GetID(), owner))
- {
- Handle_TDocStd_Document empty;
- owner->SetDocument(empty);
- }
- aContext.Nullify();
+ aD1->BeforeClose();
aD1->Close();
- aD1.Nullify();
return 0;
}