Bug 98899

Summary: state transition label bounding box too small
Product: [Applications] umbrello Reporter: eric <kde>
Component: generalAssignee: Oliver Kellogg <okellogg>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.3.2   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description eric 2005-02-09 05:04:02 UTC
Version:           1.3.2 (using KDE KDE 3.3.1)
Installed from:    RedHat RPMs
OS:                Linux

Create a new state diagram.  Add a start state, end state, and a couple intermediate states.  Connect all the states with state transitions.  Select one of the transitions, then right click to get the activity menu.  Select "Change Association Name", and enter "abcd" as the name.  Click OK to accept the name and return to the diagram.

The label is now displayed, but the size of the text bounding box is much too small to display the name.  Right click the label just created, and select "Change Font".  Do not change the font size, but press "OK" to return to the diagram.  The text is now readable, and the bounding box is properly set.

This occurs on 
Linux 2.6.10-1.760_FC3  i686 athlon i386 GNU/Linux

I have tried 1.3.1 installed from RPM's as well as 1.3.2 built from source on KDE 3.3.1-2.4.FC3 with all updates from FC base and update channels as of Wed Feb 2 00:14:23 EST 2005.

Machine is a ShuttleX, which has a GeForce 4 MX display adaptor.  The bug is the same whether the stock driver or the latest download from nvidia is used.  Also happens on a thinkpad t42 on version 1.3.1 installed from RPM's.

Seems to happen wherever an association label is used -- state diagrams and activity diagrams both show the problem.  I didn't test others.
Comment 1 Oliver Kellogg 2005-02-09 18:51:37 UTC
CVS commit by okellogg: 

Constructor: Set m_Text _prior_ to calling calculateSize().
BUG:98899


  M +5 -7      floatingtext.cpp   1.68


--- kdesdk/umbrello/umbrello/floatingtext.cpp  #1.67:1.68
@@ -38,4 +38,9 @@ FloatingText::FloatingText(UMLView * vie
         m_Text = text;
         m_Role = role;
+        if ( ! UMLApp::app()->getDocument()->loading() ) {
+                calculateSize();
+                setZ( 10 );//make sure always on top.
+                update();
+        }
 }
 
@@ -45,15 +50,8 @@ void FloatingText::init() {
         m_Text = "";
         m_PostText = "";
-        //m_SeqNum = "";
-        //m_Operation = "";
         m_Role = Uml::tr_Floating;
         m_Type = Uml::wt_Text;
         // initialize non-saved (i.e. volatile) data
         m_pLink = NULL;
-        if ( ! UMLApp::app()->getDocument()->loading() ) {
-                calculateSize();
-                setZ( 10 );//make sure always on top.
-                update();
-        }
 }