[Uml-devel] [PATCH] Renaming of attributes

Sebastian Stein s5228 at informatik.htw-dresden.de
Fri Jul 26 09:58:05 UTC 2002


Ok, like I allready mentioned some days ago, there is something not ok, when
you add an attribute or operation. Everytime you don't change the name you
are asked if this is ok.

But you are not asked when you change the name into an allready existing one
of another operation or attribute.

It was easy to fix this, just a ! to much. See the attached patch.

Steinchen
-- 
http://www.hpfsc.de/ - die Seite rund um:
Assembler, Bundeswehr, TFT LCDs, Halle/Saale, Fahrradtouren,
Wanderstaat Mauma, Raumschiff USS Nathan, Enemy Room, MLCAD Tutorial
-------------- next part --------------
diff -u alt/umlattributedialog.cpp neu/umlattributedialog.cpp
--- alt/umlattributedialog.cpp	Fri Jul 26 18:51:58 2002
+++ neu/umlattributedialog.cpp	Fri Jul 26 18:48:48 2002
@@ -116,7 +116,7 @@
 	}
 
 	QPtrList<UMLObject> list= pConcept -> findChildObject( Uml::ot_Attribute, name ); 
-	if( list.count() != 0 && !list.findRef( m_pAttribute ) )
+	if( list.count() != 0 && list.findRef( m_pAttribute ) )
 	{
 		KMessageBox::error(this, i18n("The Parameter name you have chosen is already being used in this operation."),
 				i18n("Parameter name not unique."), false);
diff -u alt/umloperationdialog.cpp neu/umloperationdialog.cpp
--- alt/umloperationdialog.cpp	Fri Jul 26 18:51:58 2002
+++ neu/umloperationdialog.cpp	Fri Jul 26 18:47:35 2002
@@ -260,7 +260,7 @@
 		m_pNameLE -> setText( m_pOperation -> GetName() );
 		return;
 	}
-	if( list.count() != 0 && !list.findRef( m_pOperation ) )
+	if( list.count() != 0 && list.findRef( m_pOperation ) )
 	{
 		if( KMessageBox::warningYesNo( this , i18n( "The name you entered was not unique!\nIs this what you wanted?" ),
 				i18n( "Name not unique!" ) ) == KMessageBox::No )


More information about the umbrello-devel mailing list