[Uml-devel] branches/KDE/3.5/kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sat Aug 27 12:21:05 UTC 2005


SVN commit 454033 by okellogg:

BUG:111502 - From peter.soetens mech kuleuven ac be  2005-08-25 18:47
> Created an attachment (id=12371)
>  --> (http://bugs.kde.org/attachment.cgi?id=12371&action=view)
>  PATCH Sets current operation selected in Combo Box
>  Adding a small function to the selectopdlg.h/cpp files, and invoking
>  it from floatingtext.cpp solves this bug.


 M  +1 -1      ChangeLog  
 M  +13 -0     umbrello/dialogs/selectopdlg.cpp  
 M  +7 -0      umbrello/dialogs/selectopdlg.h  
 M  +4 -1      umbrello/floatingtext.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #454032:454033
@@ -10,7 +10,7 @@
 
 * Bugs fixed / wishes implemented (see http://bugs.kde.org)
  57588  58809  67719  72016  79433  87252  88117  97162 105564 108223
-109591 109636 110216 110231 110379 111470
+109591 109636 110216 110231 110379 111470 111502
 
 Version 1.4.2 (maintenance release)
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/selectopdlg.cpp #454032:454033
@@ -110,6 +110,19 @@
     }
 }
 
+bool SelectOpDlg::setClassOp(const QString &op) {
+    for (int i = 1; i!= m_pOpCB->count(); ++i)
+    {
+        if ( m_pOpCB->text(i) == op ) {
+            m_pOpCB->setCurrentItem(i);
+            m_pCustomRB -> setChecked(false);
+            slotSelected(OP);
+            return true;
+        }
+    }
+    return false;
+}
+
 QString SelectOpDlg::getSeqNumber() {
     return m_pSeqLE->text();
 }
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/selectopdlg.h #454032:454033
@@ -83,6 +83,13 @@
      *	@param op The operation to set as the custom operation.
      */
     void setCustomOp(const QString &op);
+    /**
+     * Set the class operation text.
+     *
+     *	@param op The operation to set as the class operation.
+     * @return false if no such operation exists.
+     */
+    bool setClassOp(const QString &op);
 private:
     QGroupBox * m_pOpGB;
     QComboBox *	m_pOpCB;
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/floatingtext.cpp #454032:454033
@@ -260,8 +260,11 @@
 
     SelectOpDlg selectDlg(m_pView, c);
     selectDlg.setSeqNumber( seqNum );
-    if (m_pLink->getOperation() == NULL)
+    if (m_pLink->getOperation() == NULL) {
         selectDlg.setCustomOp( opText );
+    } else {
+        selectDlg.setClassOp( opText );
+    }
     int result = selectDlg.exec();
     if(!result) {
         return;




More information about the umbrello-devel mailing list