Gnats 5094: Crash when opening Simulation Object List.
Phil Weinstein, 9-9-2011, Resolved / See Gnats entry.
The crash occurred when showing the workspace Simulation Object List after loading a model at a time when the Simulation Object List had been hidden.
Changes to resolve this problem.
The primary fix (#2) was allowing the Simulation Object List to be visible during the full initialization of the Workspace GUI, and subsequently conditionally hiding it (based on the prior state saved in User Settings) after a delay after the first "show" event of the Workspace dialog. It's possible that upgrading to Qt 4.6.4 or the latest version of Qt 4.7 would have more directly resolved this problem. (We're currently using Qt 4.6.3).
Diagnostic traces:
Technical Change Summary:
-------------------
Q3GUI/Workspace.hpp
Q3GUI/Workspace.cpp
-------------------
Instead of restoring the saved "show" state of the Simulation Object List during the main Workspace widget initialization (in method Workspace:: initWidgets()), apply the saved "show" state later, via a timer-delayed mechanism, scheduled at the first "showing" of the Workspace dialog (i.e. schedule a QTimer in Workspace::showEvent()).
New data member:
QTimer* _initWsListVisibility_Timer;
New methods:
void schedInitWsListVisibility();
void cancelInitWsListVisibility (bool deleteToo=false);
void initWsListVisibility();
void initWsListVisibility_Timeout();
-----------------------------
Q3GUI/WorkspaceTreeWidget.hpp
Q3GUI/WorkspaceTreeWidget.cpp
-----------------------------
In method: void WorkspaceTreeWidget::resizeEvent (QResizeEvent* evt) ...
Don't process "Resize" event which represents notification of the initial size of the dialog (characterized by negative dimensions of QResizeEvent::oldSize()).
Don't delete the '_updateScrollBarGeomTimer' when cancelling that timer. (In particular, don't do that from WorkspaceTreeWidget:: resizeEvent()).
-------------------
Q3GUI/Workspace.cpp
-------------------
General cleanup and "safeties" for these QWidgets:
QDockWidget* _wsListDockWidget;
QFrame* _wsListFrame;
... for example, replacement of uses of Qt3-compatibility methods.
In method: void Workspace::wsListDockWidget_visibilityChanged (bool isVis) Don't call saveWorkspaceQSettings() if the first "show" event has not yet been processed for the Workspace.
See also method: void Workspace::restoreObjectListWidth().
---