[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sun Jul 18 23:22:00 UTC 2004


CVS commit by okellogg: 

setInPaste(): New. Required for fixing bug 85375.


  M +9 -1      umlobject.cpp   1.38
  M +10 -0     umlobject.h   1.34


--- kdesdk/umbrello/umbrello/umlobject.cpp  #1.37:1.38
@@ -48,4 +48,5 @@ void UMLObject::init() {
         m_bAbstract = false;
         m_bStatic = false;
+        m_bInPaste = false;
 
 /*
@@ -179,4 +180,8 @@ void UMLObject::setAbstract(bool bAbstra
 }
 
+void UMLObject::setInPaste(bool bInPaste /* =true */) {
+        m_bInPaste = bInPaste;
+}
+
 /** Returns true if this UMLObject has classifier scope, otherwise false (the default). */
 bool UMLObject::getStatic() const
@@ -484,4 +489,7 @@ bool UMLObject::loadFromXMI( QDomElement
                 else
                         umldoc->addUMLObject(this);
+                if (m_bInPaste)
+                        m_bInPaste = false;
+                else
                 umldoc->signalUMLObjectCreated(this);
         }

--- kdesdk/umbrello/umbrello/umlobject.h  #1.33:1.34
@@ -211,4 +211,9 @@ public:
 
         /**
+         * Sets the abstract state of the object.
+         */
+        void setInPaste(bool bInPaste = true);
+
+        /**
          * This method saves the XMI attributes of each specific model class.
          * It needs to be implemented by each child class.
@@ -367,4 +372,9 @@ protected:
          */
         bool m_bStatic;
+
+        /**
+         * Caller sets this true when in paste operation.
+         */
+        bool m_bInPaste;
 };
 






More information about the umbrello-devel mailing list