[Uml-devel] [PATCH] Crash while calling properties from listview part II -> hopefully fixed
Sebastian Stein
s5228 at informatik.htw-dresden.de
Tue Jul 23 23:14:04 UTC 2002
Next try ;-)
I think this time I really found the problem. I was in the right place and I
had only to copy the correct code from double click. So if we call
Properties from a diagram object, the app crashed on the following call:
umlType = object -> getBaseType();
Well, I have to say I didn't looked why the app is crashing there. I used
the way in the double click property call, where we first check if we have
a diagram and if yes call the prop dialog before we reach the above line of
code.
So please see my attached patch and keep in mind, that I didn't checked if
the problem lies deeper in getBaseType().
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/mylistview.cpp neu/mylistview.cpp
--- alt/mylistview.cpp Tue Jul 23 23:36:19 2002
+++ neu/mylistview.cpp Tue Jul 23 23:40:57 2002
@@ -208,6 +208,21 @@
break;
case ListPopupMenu::mt_Properties:
+ /* first check if we are on a diagram */
+ if( lvtType >= Uml::lvt_UseCase_Diagram &&
+ lvtType <= Uml::lvt_Sequence_Diagram )
+ {
+ UMLView * pView = doc -> findView( temp -> getID() );
+ if( !pView )
+ return;
+ doc -> getDocWindow() -> updateDocumentation( false );
+ pView -> showPropDialog();
+ doc -> getDocWindow() -> showDocumentation( pView, true );
+ temp -> cancelRename( 0 );
+ return;
+ }
+
+ /* ok, we are on another object, so find out on which one */
umlType = object -> getBaseType();
if(umlType >= Uml::ot_Actor && umlType <= Uml::ot_Concept)
More information about the umbrello-devel
mailing list