Define closeDialog() method in Control as slot to allow delayed destruction of task dialogs

This commit is contained in:
wmayer
2012-11-28 13:48:22 +01:00
parent dd67c22837
commit 56e352c421
2 changed files with 6 additions and 3 deletions

View File

@@ -26,6 +26,7 @@
#ifndef _PreComp_
# include <QAction>
# include <QMenu>
# include <QTimer>
# include <Standard_math.hxx>
# include <Inventor/actions/SoSearchAction.h>
# include <Inventor/draggers/SoDragger.h>
@@ -534,7 +535,7 @@ void ViewProviderThickness::unsetEdit(int ModNum)
{
if (ModNum == ViewProvider::Default) {
// when pressing ESC make sure to close the dialog
Gui::Control().closeDialog();
QTimer::singleShot(0, &Gui::Control(), SLOT(closeDialog()));
}
else {
PartGui::ViewProviderPart::unsetEdit(ModNum);