+ fixes #0001549: crash with Draft move tool while sketch is in edit mode
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <QApplication>
|
||||
# include <QDebug>
|
||||
# include <QDockWidget>
|
||||
# include <QPointer>
|
||||
@@ -162,6 +163,37 @@ Gui::TaskView::TaskDialog* ControlSingleton::activeDialog() const
|
||||
return ActiveDialog;
|
||||
}
|
||||
|
||||
Gui::TaskView::TaskView* ControlSingleton::getTaskPanel()
|
||||
{
|
||||
// should return the pointer to combo view
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
(Gui::DockWindowManager::instance()->getDockWindow("Combo View"));
|
||||
if (pcCombiView)
|
||||
return pcCombiView->getTaskPanel();
|
||||
else
|
||||
return _taskPanel;
|
||||
}
|
||||
|
||||
void ControlSingleton::accept()
|
||||
{
|
||||
Gui::TaskView::TaskView* taskPanel = getTaskPanel();
|
||||
if (taskPanel) {
|
||||
taskPanel->accept();
|
||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents |
|
||||
QEventLoop::ExcludeSocketNotifiers);
|
||||
}
|
||||
}
|
||||
|
||||
void ControlSingleton::reject()
|
||||
{
|
||||
Gui::TaskView::TaskView* taskPanel = getTaskPanel();
|
||||
if (taskPanel) {
|
||||
taskPanel->reject();
|
||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents |
|
||||
QEventLoop::ExcludeSocketNotifiers);
|
||||
}
|
||||
}
|
||||
|
||||
void ControlSingleton::closeDialog()
|
||||
{
|
||||
Gui::DockWnd::CombiView* pcCombiView = qobject_cast<Gui::DockWnd::CombiView*>
|
||||
|
||||
Reference in New Issue
Block a user