src/document.cc

changeset 562
c4ff45e98551
parent 560
39085791128f
child 563
10939452bf86
equal deleted inserted replaced
561:1d90296ad3fc 562:c4ff45e98551
870 if (obj->getType() == LDObject::Vertex) 870 if (obj->getType() == LDObject::Vertex)
871 m_Vertices << obj; 871 m_Vertices << obj;
872 872
873 #ifdef DEBUG 873 #ifdef DEBUG
874 if (!isImplicit()) 874 if (!isImplicit())
875 dlog ("Added object #%1\n", obj->getID()); 875 dlog ("Added object #%1 (%2)\n", obj->getID(), obj->getTypeName());
876 #endif 876 #endif
877 877
878 obj->setFile (this); 878 obj->setFile (this);
879 return getObjectCount() - 1; 879 return getObjectCount() - 1;
880 } 880 }
891 // ----------------------------------------------------------------------------- 891 // -----------------------------------------------------------------------------
892 void LDDocument::insertObj (int pos, LDObject* obj) 892 void LDDocument::insertObj (int pos, LDObject* obj)
893 { getHistory()->add (new AddHistory (pos, obj)); 893 { getHistory()->add (new AddHistory (pos, obj));
894 m_Objects.insert (pos, obj); 894 m_Objects.insert (pos, obj);
895 obj->setFile (this); 895 obj->setFile (this);
896
897 #ifdef DEBUG
898 if (!isImplicit())
899 dlog ("Inserted object #%1 (%2) at %3\n", obj->getID(), obj->getTypeName(), pos);
900 #endif
896 } 901 }
897 902
898 // ============================================================================= 903 // =============================================================================
899 // ----------------------------------------------------------------------------- 904 // -----------------------------------------------------------------------------
900 void LDDocument::forgetObject (LDObject* obj) 905 void LDDocument::forgetObject (LDObject* obj)

mercurial