[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Thu Apr 8 14:17:03 UTC 2004
CVS commit by okellogg:
Apply FixDiagramOptionLoad.diff by Achim Spangler.
M +6 -2 umldoc.cpp 1.133
--- kdesdk/umbrello/umbrello/umldoc.cpp #1.132:1.133
@@ -1102,9 +1102,9 @@ void UMLDoc::createDiagram(Diagram_Type
} else if(!findView(type, name)) {
UMLView* temp = new UMLView(UMLApp::app()->getMainViewWidget(), this);
+ temp -> setOptionState( getOptionState() );
temp->setName( name );
temp->setType( type );
temp->setID( getUniqueID() );
addView(temp);
- temp -> setOptionState( getOptionState() );
emit sigDiagramCreated(uniqueID);
setModified(true);
@@ -1910,4 +1910,9 @@ bool UMLDoc::loadDiagramsFromXMI( QDomNo
if( element.tagName() == "diagram" ) {
pView = new UMLView(UMLApp::app()->getMainViewWidget(), this);
+ // IMPORTANT: Set OptionState of new UMLView _BEFORE_
+ // reading the corresponding diagram:
+ // + allow using per-diagram color and line-width settings
+ // + avoid crashes due to uninitialized values for lineWidth
+ pView -> setOptionState( state );
if( !pView->loadFromXMI( element ) ) {
kdWarning() << "failed load on viewdata loadfromXMI" << endl;
@@ -1916,5 +1921,4 @@ bool UMLDoc::loadDiagramsFromXMI( QDomNo
}
pView -> hide();
- pView -> setOptionState( state );
addView( pView );
emit sigSetStatusbarProgress( ++count );
More information about the umbrello-devel
mailing list