Bug 57882

Summary: Note items: Lots of text in multiple lines--can leave trash on drag
Product: [Applications] umbrello Reporter: Stevan White <stevan_white>
Component: generalAssignee: John Ratke <jratke>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.1.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: some text outside the notewidget

Description Stevan White 2003-04-30 09:33:54 UTC
Version:           1.1.1 (using KDE KDE 3.1.1)
Compiler:          Sun Java2 SDK 1.4.1 
OS:          Linux

Make a note item.  Put in it numerous multiple lines (that is, text with a return character at the end).  

You have to play with this, but...

If you keep re-sizing the note in such a way the text doesn't all fit in the note pane, you will eventually see the last visible line of text drawn partially outside the pane.

At this point, if you drag the note, it will leave trash all over the diagram.
Comment 1 John Ratke 2003-10-12 05:08:54 UTC
Subject: kdesdk/umbrello/umbrello

CVS commit by jratke: 


Fix text with multiple new lines extending out of note widget.

CCMAIL: 57882-done@bugs.kde.org


  M +2 -0      notewidget.cpp   1.13


--- kdesdk/umbrello/umbrello/notewidget.cpp  #1.12:1.13
@@ -178,4 +178,6 @@ void NoteWidget::drawText(QPainter & p, 
                                 }//end if
                                 else
+                                        if ( textY > height )
+                                                return;
                                         p.drawText( offsetX + textX, offsetY + textY , textWidth, fontHeight, AlignLeft, word );
                         }//end if


Comment 2 Sebastian Stein 2003-10-12 18:10:16 UTC
Created attachment 2755 [details]
some text outside the notewidget
Comment 3 Sebastian Stein 2003-10-12 18:11:31 UTC
It still doesn't work in some cases. I entered the following data into the 
widget and resized it a lot. I'm able to reproduce the picture I attached with 
the following text in the note: 
 
Comment 4 John Ratke 2003-10-19 19:22:20 UTC
Subject: kdesdk/umbrello/umbrello

CVS commit by jratke: 


Completely fix the problem of text extending out of note widgets this time.

CCMAIL: 57882-done@bugs.kde.org


  M +10 -0     notewidget.cpp   1.15


--- kdesdk/umbrello/umbrello/notewidget.cpp  #1.14:1.15
@@ -174,7 +174,9 @@ void NoteWidget::drawText(QPainter & p, 
                                 }//end if
                                 else
+                                {
                                         if ( textY > height )
                                                 return;
                                         p.drawText( offsetX + textX, offsetY + textY , textWidth, fontHeight, AlignLeft, word );
+                                }
                         }//end if
                         textX = margin;
@@ -195,5 +197,9 @@ void NoteWidget::drawText(QPainter & p, 
                                 }//end if
                                 else
+                                {
+                                        if ( textY > height )
+                                                return;
                                         p.drawText( offsetX + textX, offsetY + textY , textWidth, fontHeight, AlignLeft, word );
+                                }
                                 textX += textWidth;
                         }//end if
@@ -215,5 +221,9 @@ void NoteWidget::drawText(QPainter & p, 
                 }//end if
                 else
+                {
+                        if ( textY > height )
+                                return;
                         p.drawText( offsetX + textX, offsetY + textY , textWidth, fontHeight, AlignLeft, word );
+                }
         }//end if
 }


Comment 5 Stevan White 2004-06-13 14:17:05 UTC
I no longer see this effect in 1.2.1