[Uml-devel] kdesdk/umbrello/umbrello

Sebastian Stein seb.kde at hpfsc.de
Wed Jul 28 06:24:15 UTC 2004


CVS commit by sstein: 

patch by Achim Spangler:

part 1:
The load of EnumWidget caused unneeded adjustAssoc warnings. This was caused by the one and only constructor of EnumWidget which set always (!!) the size and triggered then the update, which then called adjust Assoc...                       
                                                                                       
Now I simply inserted a check in the constructor, so that the size setting is only performed _without_ running load - i.e. on creation of really new instance.                                                                              

part 2:
The other change is simply switching off ( comment out ) the warning line for each hide/show event in umlview.cpp


  M +6 -2      enumwidget.cpp   1.13
  M +2 -2      umlview.cpp   1.165


--- kdesdk/umbrello/umbrello/umlview.cpp  #1.164:1.165
@@ -393,5 +393,5 @@ void UMLView::showEvent(QShowEvent* /*se
 
 #       ifdef MANUAL_CONTROL_DOUBLE_BUFFERING
-        kdWarning() << "Show Event for " << getName() << endl;
+        //kdWarning() << "Show Event for " << getName() << endl;
         canvas()->setDoubleBuffering( true );
         // as the diagram gets now visible again,
@@ -419,5 +419,5 @@ void UMLView::hideEvent(QHideEvent* /*he
 
 #       ifdef MANUAL_CONTROL_DOUBLE_BUFFERING
-        kdWarning() << "Hide Event for " << getName() << endl;
+        //kdWarning() << "Hide Event for " << getName() << endl;
         canvas()->setDoubleBuffering( false );
         // a periodic update of all - also invisible - diagrams

--- kdesdk/umbrello/umbrello/enumwidget.cpp  #1.12:1.13
@@ -22,6 +22,10 @@
 EnumWidget::EnumWidget(UMLView* view, UMLObject* o) : UMLWidget(view, o) {
         init();
+        if ( ! UMLApp::app()->getDocument()->loading() )
+        { // set default size - but only if we aren't loading a XMI file at the
+                // moment - then just recreate the saved settings
         setSize(100,30);
         calculateSize();
+        }
 }
 ////////////////////////////////////////////////////////////////////////////////////////////////////






More information about the umbrello-devel mailing list