[Uml-devel] KDE/kdesdk/umbrello

Ralf Habacker ralf.habacker at gmail.com
Fri Oct 26 20:47:37 UTC 2012


SVN commit 1322695 by habacker:

Bug fix not been able to add some state widgets.

BUG: 309064

 M  +1 -0      ChangeLog  
 M  +1 -1      umbrello/widgets/umlwidget.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #1322694:1322695
@@ -1,6 +1,7 @@
 Version 2.10.0
 
 * New feature: Line based grid drawing
+* some state diagram widgets could not be added (309064)
 * no classes displayed after xmi file loading (309007)
 * wrong origin of classes in print page preview (308959)
 * migrate remaining qt3 classes to qt4 (290952)
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.cpp #1322694:1322695
@@ -306,7 +306,7 @@
 
     if (fixedAspectRatio()) {
         UMLSceneSize size = UMLSceneRectItem::size();
-        float aspectRatio = (float)size.height()/size.width();
+        float aspectRatio = size.width() > 0 ? (float)size.height()/size.width() : 1;
         height = width * aspectRatio;
     }
 }




More information about the umbrello-devel mailing list