wmayer
2017-05-16 09:18
administrator
~0009029
Last edited: 2017-05-16 09:19
|
Add the test code into DocumentObjectItem::DocumentObjectItem
Base::Console().Message("Create item: %d, Object: %s\n", ++countItems, viewObject->getObject()->getNameInDocument());
and in DocumentObjectItem::~DocumentObjectItem()
Base::Console().Message("Delete item: %d, Object: %s\n", countItems--, viewObject->getObject()->getNameInDocument());
When reading the project the output is:
Create item: 1, Object: Sketch
Create item: 2, Object: Sketch
Create item: 3, Object: Revolution
Create item: 4, Object: Revolution
Create item: 5, Object: Part
Create item: 6, Object: Part
Create item: 7, Object: PartOrigin
Create item: 8, Object: PartOrigin
Create item: 9, Object: X_Axis
Create item: 10, Object: X_Axis
Create item: 11, Object: Y_Axis
Create item: 12, Object: Y_Axis
Create item: 13, Object: Z_Axis
Create item: 14, Object: Z_Axis
Create item: 15, Object: XY_Plane
Create item: 16, Object: XY_Plane
Create item: 17, Object: XZ_Plane
Create item: 18, Object: XZ_Plane
Create item: 19, Object: YZ_Plane
Create item: 20, Object: YZ_Plane
Create item: 21, Object: RevolutionBody
Create item: 22, Object: RevolutionBody
Create item: 23, Object: RevolutionBodyOrigin
Create item: 24, Object: RevolutionBodyOrigin
Create item: 25, Object: X_Axis001
Create item: 26, Object: X_Axis001
Create item: 27, Object: Y_Axis001
Create item: 28, Object: Y_Axis001
Create item: 29, Object: Z_Axis001
Create item: 30, Object: Z_Axis001
Create item: 31, Object: XY_Plane001
Create item: 32, Object: XY_Plane001
Create item: 33, Object: XZ_Plane001
Create item: 34, Object: XZ_Plane001
Create item: 35, Object: YZ_Plane001
Create item: 36, Object: YZ_Plane001
Create item: 37, Object: Part002
Create item: 38, Object: Part002
Create item: 39, Object: Part002Origin
Create item: 40, Object: Part002Origin
Create item: 41, Object: X_Axis004
Create item: 42, Object: X_Axis004
Create item: 43, Object: Y_Axis004
Create item: 44, Object: Y_Axis004
Create item: 45, Object: Z_Axis004
Create item: 46, Object: Z_Axis004
Create item: 47, Object: XY_Plane004
Create item: 48, Object: XY_Plane004
Create item: 49, Object: XZ_Plane004
Create item: 50, Object: XZ_Plane004
Create item: 51, Object: YZ_Plane004
Create item: 52, Object: YZ_Plane004
Create item: 53, Object: Body001
Create item: 54, Object: Body001
Create item: 55, Object: Body001Origin
Create item: 56, Object: Body001Origin
Create item: 57, Object: X_Axis005
Create item: 58, Object: X_Axis005
Create item: 59, Object: Y_Axis005
Create item: 60, Object: Y_Axis005
Create item: 61, Object: Z_Axis005
Create item: 62, Object: Z_Axis005
Create item: 63, Object: XY_Plane005
Create item: 64, Object: XY_Plane005
Create item: 65, Object: XZ_Plane005
Create item: 66, Object: XZ_Plane005
Create item: 67, Object: YZ_Plane005
Create item: 68, Object: YZ_Plane005
Create item: 69, Object: Sketch003
Create item: 70, Object: Sketch003
Create item: 71, Object: Revolution002
Create item: 72, Object: Revolution002
Create item: 73, Object: Sketch004
Create item: 74, Object: Sketch004
Create item: 75, Object: Pocket001
Create item: 76, Object: Pocket001
Create item: 77, Object: Sketch005
Create item: 78, Object: Sketch005
Create item: 79, Object: Pocket002
Create item: 80, Object: Pocket002
Create item: 81, Object: Sketch006
Create item: 82, Object: Sketch006
Create item: 83, Object: Pocket003
Create item: 84, Object: Pocket003
Create item: 85, Object: Mirrored
Create item: 86, Object: Mirrored
Create item: 87, Object: Sketch007
Create item: 88, Object: Sketch007
Create item: 89, Object: Pocket004
Create item: 90, Object: Pocket004
Create item: 91, Object: Cut
Create item: 92, Object: Cut
and
Create item: 93, Object: Sketch003
Create item: 94, Object: Revolution002
Create item: 95, Object: Sketch004
Create item: 96, Object: Pocket001
Create item: 97, Object: Sketch005
Create item: 98, Object: Pocket002
Create item: 99, Object: Sketch006
Create item: 100, Object: Pocket003
Create item: 101, Object: Mirrored
Create item: 102, Object: Sketch007
Create item: 103, Object: Pocket004
Create item: 104, Object: Sketch003
Create item: 105, Object: Revolution002
Create item: 106, Object: Sketch004
Create item: 107, Object: Pocket001
Create item: 108, Object: Sketch005
Create item: 109, Object: Pocket002
Create item: 110, Object: Sketch006
Create item: 111, Object: Pocket003
Create item: 112, Object: Mirrored
Create item: 113, Object: Sketch007
Create item: 114, Object: Pocket004
Create item: 115, Object: Sketch003
Create item: 116, Object: Revolution002
Create item: 117, Object: Sketch004
Create item: 118, Object: Pocket001
Create item: 119, Object: Sketch005
Create item: 120, Object: Pocket002
Create item: 121, Object: Sketch006
Create item: 122, Object: Pocket003
Create item: 123, Object: Mirrored
Create item: 124, Object: Sketch007
Create item: 125, Object: Pocket004
Create item: 126, Object: Sketch003
Create item: 127, Object: Revolution002
Create item: 128, Object: Sketch004
Create item: 129, Object: Pocket001
Create item: 130, Object: Sketch005
Create item: 131, Object: Pocket002
Create item: 132, Object: Sketch006
Create item: 133, Object: Pocket003
Create item: 134, Object: Mirrored
Create item: 135, Object: Sketch007
Create item: 136, Object: Pocket004
Create item: 137, Object: Sketch003
Create item: 138, Object: Revolution002
Create item: 139, Object: Sketch004
Create item: 140, Object: Pocket001
Create item: 141, Object: Sketch005
Create item: 142, Object: Pocket002
Create item: 143, Object: Sketch006
Create item: 144, Object: Pocket003
Create item: 145, Object: Mirrored
Create item: 146, Object: Sketch007
Create item: 147, Object: Pocket004
Create item: 148, Object: Sketch003
Create item: 149, Object: Revolution002
Create item: 150, Object: Sketch004
Create item: 151, Object: Pocket001
Create item: 152, Object: Sketch005
Create item: 153, Object: Pocket002
Create item: 154, Object: Sketch006
Create item: 155, Object: Pocket003
Create item: 156, Object: Mirrored
Create item: 157, Object: Sketch007
Create item: 158, Object: Pocket004
Create item: 159, Object: Sketch003
Create item: 160, Object: Revolution002
Create item: 161, Object: Sketch004
Create item: 162, Object: Pocket001
Create item: 163, Object: Sketch005
Create item: 164, Object: Pocket002
Create item: 165, Object: Sketch006
Create item: 166, Object: Pocket003
Create item: 167, Object: Mirrored
Create item: 168, Object: Sketch007
Create item: 169, Object: Pocket004
Create item: 170, Object: Sketch003
Create item: 171, Object: Revolution002
Create item: 172, Object: Sketch004
Create item: 173, Object: Pocket001
Create item: 174, Object: Sketch005
Create item: 175, Object: Pocket002
Create item: 176, Object: Sketch006
Create item: 177, Object: Pocket003
Create item: 178, Object: Mirrored
Create item: 179, Object: Sketch007
Create item: 180, Object: Pocket004
Create item: 181, Object: Revolution002
Create item: 182, Object: Pocket001
Create item: 183, Object: Pocket002
Create item: 184, Object: Pocket003
Create item: 185, Object: Mirrored
Create item: 186, Object: Pocket004
Create item: 187, Object: Revolution002
Create item: 188, Object: Pocket001
Create item: 189, Object: Pocket002
Create item: 190, Object: Pocket003
Create item: 191, Object: Mirrored
Create item: 192, Object: Pocket004
Create item: 193, Object: Revolution
Create item: 194, Object: Pocket004
Create item: 195, Object: Revolution
Create item: 196, Object: Pocket004
Create item: 197, Object: Sketch
Create item: 198, Object: Sketch
Now expanding all items in the tree view a few more items are allocated
Create item: 199, Object: Sketch007
Create item: 200, Object: Sketch007
Create item: 201, Object: Sketch006
Create item: 202, Object: Sketch005
Create item: 203, Object: Sketch004
Create item: 204, Object: Sketch003
When closing the document less than 50% of the items are deleted:
Delete item: 204, Object: Part
Delete item: 203, Object: PartOrigin
Delete item: 202, Object: X_Axis
Delete item: 201, Object: Y_Axis
Delete item: 200, Object: Z_Axis
Delete item: 199, Object: XY_Plane
Delete item: 198, Object: XZ_Plane
Delete item: 197, Object: YZ_Plane
Delete item: 196, Object: RevolutionBody
Delete item: 195, Object: RevolutionBodyOrigin
Delete item: 194, Object: X_Axis001
Delete item: 193, Object: Y_Axis001
Delete item: 192, Object: Z_Axis001
Delete item: 191, Object: XY_Plane001
Delete item: 190, Object: XZ_Plane001
Delete item: 189, Object: YZ_Plane001
Delete item: 188, Object: Revolution
Delete item: 187, Object: Sketch
Delete item: 186, Object: Part002
Delete item: 185, Object: Part002Origin
Delete item: 184, Object: X_Axis004
Delete item: 183, Object: Y_Axis004
Delete item: 182, Object: Z_Axis004
Delete item: 181, Object: XY_Plane004
Delete item: 180, Object: XZ_Plane004
Delete item: 179, Object: YZ_Plane004
Delete item: 178, Object: Body001
Delete item: 177, Object: Body001Origin
Delete item: 176, Object: X_Axis005
Delete item: 175, Object: Y_Axis005
Delete item: 174, Object: Z_Axis005
Delete item: 173, Object: XY_Plane005
Delete item: 172, Object: XZ_Plane005
Delete item: 171, Object: YZ_Plane005
Delete item: 170, Object: Revolution002
Delete item: 169, Object: Pocket001
Delete item: 168, Object: Pocket002
Delete item: 167, Object: Pocket003
Delete item: 166, Object: Mirrored
Delete item: 165, Object: Pocket004
Delete item: 164, Object: Cut
Delete item: 163, Object: Revolution
Delete item: 162, Object: Sketch
Delete item: 161, Object: Pocket004
Delete item: 160, Object: Part
Delete item: 159, Object: PartOrigin
Delete item: 158, Object: X_Axis
Delete item: 157, Object: Y_Axis
Delete item: 156, Object: Z_Axis
Delete item: 155, Object: XY_Plane
Delete item: 154, Object: XZ_Plane
Delete item: 153, Object: YZ_Plane
Delete item: 152, Object: RevolutionBody
Delete item: 151, Object: RevolutionBodyOrigin
Delete item: 150, Object: X_Axis001
Delete item: 149, Object: Y_Axis001
Delete item: 148, Object: Z_Axis001
Delete item: 147, Object: XY_Plane001
Delete item: 146, Object: XZ_Plane001
Delete item: 145, Object: YZ_Plane001
Delete item: 144, Object: Revolution
Delete item: 143, Object: Sketch
Delete item: 142, Object: Part002
Delete item: 141, Object: Part002Origin
Delete item: 140, Object: X_Axis004
Delete item: 139, Object: Y_Axis004
Delete item: 138, Object: Z_Axis004
Delete item: 137, Object: XY_Plane004
Delete item: 136, Object: XZ_Plane004
Delete item: 135, Object: YZ_Plane004
Delete item: 134, Object: Body001
Delete item: 133, Object: Body001Origin
Delete item: 132, Object: X_Axis005
Delete item: 131, Object: Y_Axis005
Delete item: 130, Object: Z_Axis005
Delete item: 129, Object: XY_Plane005
Delete item: 128, Object: XZ_Plane005
Delete item: 127, Object: YZ_Plane005
Delete item: 126, Object: Revolution002
Delete item: 125, Object: Sketch003
Delete item: 124, Object: Pocket001
Delete item: 123, Object: Sketch004
Delete item: 122, Object: Pocket002
Delete item: 121, Object: Sketch005
Delete item: 120, Object: Pocket003
Delete item: 119, Object: Sketch006
Delete item: 118, Object: Mirrored
Delete item: 117, Object: Pocket004
Delete item: 116, Object: Sketch007
Delete item: 115, Object: Cut
Delete item: 114, Object: Revolution
Delete item: 113, Object: Sketch
Delete item: 112, Object: Pocket004
Delete item: 111, Object: Sketch007
|