[Uml-devel] [Bug 152757] Note widgets get resized when printing

Ralf Habacker ralf.habacker at gmail.com
Tue Jun 5 05:17:33 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=152757

Ralf Habacker <ralf.habacker at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #12 from Ralf Habacker <ralf.habacker at gmail.com> ---
Reopened because further testing shows that some widgets (for example
ClassifierWidget and ActorWidget depends on content related minimumSize for
getting initial size on widget construction). The lets me assume that
NoteWidget::minimalSize should return content related size for the default note
type as it is done for the special note widget types. But what about the above
mentioned "wrong" assumption ? 
A fix for the note widget is to add an additional virtual calculateSize()
method wich return content based bounding box, which is used in
UMLWidget::updateComponentSize(). The widget size will be limited to the lower
or upper bounds when these limits are exceeded. 

/**
 * Update the size of this widget.
 */
void UMLWidget::updateComponentSize()
{
    if (m_doc->loading())
        return;
    QSize size = calculateSize();
    int clipWidth = size.width();
    int clipHeight = size.height();
    constrain(clipWidth, clipHeight);
    setSize(clipWidth, clipHeight);
    adjustAssocs(x(), y());    // adjust assoc lines
}

-- 
You are receiving this mail because:
You are the assignee for the bug.




More information about the umbrello-devel mailing list