[Uml-devel] KDE_3_2_BRANCH: kdesdk/umbrello/umbrello

Sebastian Stein seb.kde at hpfsc.de
Tue Feb 3 13:37:28 UTC 2004


CVS commit by sstein: 

backport of fix for bug #73278: changing the name of a state causes it to be
drawn in bold


  M +3 -1      statewidget.cpp   1.14.2.1
  M +3 -0      dialogs/statedialog.cpp   1.6.2.1


--- kdesdk/umbrello/umbrello/statewidget.cpp  #1.14:1.14.2.1
@@ -44,5 +44,7 @@ void StateWidget::draw(QPainter & p, int
                                         p.drawRoundRect(offsetX, offsetY, w, h, (h*40)/w, (w*40)/h);
                                         p.setPen(black);
-                                        p.setFont(UMLWidget::getFont());
+                                        QFont font = UMLWidget::getFont();
+                                        font.setBold( false );
+                                        p.setFont( font );
                                         p.drawText(offsetX + STATE_MARGIN, offsetY + textStartY, w - STATE_MARGIN * 2, fontHeight, AlignCenter, getName());
                                         p.setPen(UMLWidget::getLineColour());

--- kdesdk/umbrello/umbrello/dialogs/statedialog.cpp  #1.6:1.6.2.1
@@ -68,4 +68,5 @@ void StateDialog::applyPage( Page page )
                 case ColorPage:
                         m_pColorPage -> updateUMLWidget();
+                        break;
 
                 case FontPage:
@@ -117,4 +118,6 @@ void StateDialog::setupGeneralPage() {
 
 void StateDialog::setupFontPage() {
+        if ( !m_pStateWidget )
+                return;
         QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts")  );
         m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);






More information about the umbrello-devel mailing list