[Uml-devel] kdesdk/umbrello/umbrello/dialogs
Sebastian Stein
seb.kde at hpfsc.de
Tue Aug 12 14:49:06 UTC 2003
CVS commit by sstein:
first try to fix bug 55051: When using the class properties dialog to add a new operation/attribute, the documentation entered is now saved before a new operation is created or the properties of the operation/attribute are called.
Well, the fix only works if the selected attribute/operation with the new documentation isn't the last one in the attribute/operation list. If it is the last one, the documentation is still lost when clicking on the Create button. No idea why, it must be some kind of index problem...
M +10 -0 classattpage.cpp 1.8
M +11 -1 classopspage.cpp 1.8
--- kdesdk/umbrello/umbrello/dialogs/classopspage.cpp #1.7:1.8
@@ -168,5 +168,5 @@ void ClassOpsPage::slotOpRightButtonPres
}
-void ClassOpsPage::slotOpRightButtonClicked(QListBoxItem */*item*/, const QPoint &/*p*/) {
+void ClassOpsPage::slotOpRightButtonClicked(QListBoxItem * /*item*/, const QPoint & /*p*/) {
if(m_pMenu) {
m_pMenu -> hide();
@@ -285,4 +285,9 @@ void ClassOpsPage::slotDoubleClick( QLis
void ClassOpsPage::slotProperties() {
+ //save highlighted item first
+ UMLOperation* selectedOperation = m_pOpList->at( m_pOpsLB -> currentItem() );
+ if (selectedOperation)
+ selectedOperation -> setDoc( m_pDocTE -> text() );
+
slotDoubleClick( m_pOpsLB -> item( m_pOpsLB -> currentItem() ) );
}
@@ -298,4 +303,9 @@ void ClassOpsPage::slotDelete() {
void ClassOpsPage::slotNewOperation() {
+ //save highlighted item first
+ UMLOperation* selectedOperation = m_pOpList->at( m_pOpsLB -> currentItem() );
+ if (selectedOperation)
+ selectedOperation -> setDoc( m_pDocTE -> text() );
+
m_bSigWaiting = true;
m_pDoc->createUMLObject(m_pConcept, Uml::ot_Operation);
--- kdesdk/umbrello/umbrello/dialogs/classattpage.cpp #1.7:1.8
@@ -313,8 +313,18 @@ void ClassAttPage::slotDelete() {
void ClassAttPage::slotProperties() {
+ //save highlighted item first
+ UMLAttribute* selectedAttribute = m_pAttList->at( m_pAttsLB->currentItem() );
+ if (selectedAttribute)
+ selectedAttribute -> setDoc( m_pDocTE -> text() );
+
slotDoubleClick( m_pAttsLB->item( m_pAttsLB->currentItem() ) );
}
void ClassAttPage::slotNewAttribute() {
+ //save highlighted item first
+ UMLAttribute* selectedAttribute = m_pAttList->at( m_pAttsLB->currentItem() );
+ if (selectedAttribute)
+ selectedAttribute -> setDoc( m_pDocTE -> text() );
+
m_bSigWaiting = true;
m_pDoc->createUMLObject(m_pClass, Uml::ot_Attribute);
More information about the umbrello-devel
mailing list