+ fixes #0001549: crash with Draft move tool while sketch is in edit mode

This commit is contained in:
wmayer
2014-05-20 15:25:03 +02:00
parent 5fed27a003
commit 05e8a4f74c
16 changed files with 51 additions and 14 deletions

View File

@@ -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*>