Skip to content
Commit cd9b676b authored by Oliver Kellogg's avatar Oliver Kellogg Committed by Ralf Habacker
Browse files

Address http://bugs.kde.org/attachment.cgi?id=88780

(In reply to Mark Stanton from comment #0)
> [...] The display doesn't resize and the app crashes.
> I may have tried this before the project had fully loaded. [...]

The backtrace confirms this, apparently you double clicked on a class widget
on a diagram while Umbrello was still busy in UMLDoc::resolveTypes().
By the way, Umbrello is finished loading when you see "Ready." in the lower
left corner of Umbrello's main window.

The following changes fend off double clicks on diagram objects while the
program is still busy in loadFromXMI() or resolveTypes():

umbrello/umldoc.cpp
- In default constructor, initialize m_bTypesAreResolved to true.
- In function closeDocument() remove assignment to m_bTypesAreResolved.
- In function openDocument(),
  - Add a few missing KIO::NetAccess::removeTempFile() calls in return-on-
    error situations;
  - Set m_bTypesAreResolved false before loadFromXMI()/loadFromMDL() calls;
  - Set m_bLoading false and m_bTypesAreResolved true before returning.
- In function loading() return true also when m_bTypesAreResolved is false.
- In function resolveTypes() postpone setting of m_bTypesAreResolved to true
  until type resolution has actually completed.

umbrello/umlscene.cpp
- In function mousePressEvent() call m_pToolBarState->mouseDoubleClick()
  only if m_doc->loading() returns false.

CCBUG: 339278
parent cb0b9c64
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment