[umbrello] [Bug 449622] fit to screen after loading file

Oliver Kellogg bugzilla_noreply at kde.org
Fri Dec 30 09:57:33 GMT 2022


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

--- Comment #10 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 980f0c120fe13b822e998a8e6af67913d5d4b40a by Oliver Kellogg.
Committed on 30/12/2022 at 09:57.
Pushed by okellogg into branch 'master'.

Address https://bugs.kde.org/show_bug.cgi?id=449622#c4 ,

> I looked into this and there is one line in the file that does not fit
> with this approach.  It is line 1895,
> <floatingtext [...] x="-4.29496e+09"  y="-4.295e+09" text="sprites"
> In order for the approach to work, this line needs to be removed
> manually.

Improve widget coordinate error handling so that no manual intervention
is needed:

umbrello/umlscene.{h,cpp}
- Make function maxCanvasSize() static and document it.

umbrello/umlwidgets/umlwidget.cpp
- In functions setX and setY call UMLScene::maxCanvasSize() as a static
  function.
- In function loadFromXMI, if nX or nY are outside the range
    -UMLScene::maxCanvasSize() .. UMLScene::maxCanvasSize()
  then log a warning, set them to a fixed small value, and do not
  apply offset correction.

M  +14   -0    umbrello/umlscene.cpp
M  +2    -2    umbrello/umlscene.h
M  +19   -6    umbrello/umlwidgets/umlwidget.cpp

https://invent.kde.org/sdk/umbrello/commit/980f0c120fe13b822e998a8e6af67913d5d4b40a

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


More information about the umbrello-devel mailing list