Summary: | Use Case View: Notes resized after print/print preview | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Florian <floeschie> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED DUPLICATE | ||
Severity: | major | CC: | ralf.habacker |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Screenshots of Note items |
Description
Florian
2012-04-23 11:53:34 UTC
Created attachment 70586 [details]
Screenshots of Note items
Same issue with Box items, too. The problem is caused by the implementation of UMLWidget::updateComponentSize(), which casts the widget size to the minimum size of the widget. This is the related call stack: umbrello.exe!UMLWidget::updateComponentSize() Zeile 1298 C++ umbrello.exe!UMLWidget::forceUpdateFontMetrics(QPainter * painter) Zeile 1447 C++ umbrello.exe!UMLScene::forceUpdateWidgetFontMetrics(QPainter * painter) Zeile 3885 C++ umbrello.exe!UMLScene::print(QPrinter * pPrinter, QPainter & pPainter) Zeile 516 C++ umbrello.exe!UMLDoc::print(QPrinter * pPrinter, DiagramPrintPage * selectPage) Zeile 2570 C++ umbrello.exe!UMLApp::slotPrintPreviewPaintRequested(QPrinter * printer) Zeile 1323 C++ I changed the implementation of updateComponentSize() to /** * Update the size of this widget. */ void UMLWidget::updateComponentSize() { if (m_doc->loading()) return; - QSize size = minimumSize(); - setSize(size.width(), size.height()); + clipSize(); adjustAssocs(x(), y()); // adjust assoc lines } which is a workaround for this issue. Further digging shows the real problem which is located in minimumSize(): UMLSceneSize NoteWidget::minimumSize() { int width = 60; int height = 30; if (....) ... else { // keep width and height unchanged } return UMLSceneSize(width, height); } For default notes the size is mapped to hardcoded values instead of leaving unchanged as indicated by the comment. *** This bug has been marked as a duplicate of bug 152757 *** |