+ fixes #0001447: Crash when opening task dialog for orthographic projection while another task dialog is open
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <QDebug>
|
||||
# include <QDockWidget>
|
||||
# include <QPointer>
|
||||
#endif
|
||||
@@ -93,8 +94,18 @@ void ControlSingleton::showModelView()
|
||||
|
||||
void ControlSingleton::showDialog(Gui::TaskView::TaskDialog *dlg)
|
||||
{
|
||||
// only one dialog at a time
|
||||
assert(!ActiveDialog || ActiveDialog==dlg);
|
||||
// only one dialog at a time, print a warning instead of raising an assert
|
||||
if (ActiveDialog && ActiveDialog != dlg) {
|
||||
if (dlg) {
|
||||
qWarning() << "ControlSingleton::showDialog: Can't show "
|
||||
<< dlg->metaObject()->className()
|
||||
<< " since there is already an active task dialog";
|
||||
}
|
||||
else {
|
||||
qWarning() << "ControlSingleton::showDialog: Task dialog is null";
|
||||
}
|
||||
return;
|
||||
}
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
// should return the pointer to combo view
|
||||
|
||||
Reference in New Issue
Block a user