Define closeDialog() method in Control as slot to allow delayed destruction of task dialogs
This commit is contained in:
@@ -64,20 +64,22 @@ public:
|
||||
/// This method start an Task dialog in the TaskView
|
||||
void showDialog(Gui::TaskView::TaskDialog *dlg);
|
||||
Gui::TaskView::TaskDialog* activeDialog() const;
|
||||
void closeDialog();
|
||||
//@}
|
||||
|
||||
/** @name task view handling
|
||||
*/
|
||||
//@{
|
||||
Gui::TaskView::TaskView* taskPanel() const;
|
||||
void showTaskView();
|
||||
//@}
|
||||
|
||||
bool isAllowedAlterDocument(void) const;
|
||||
bool isAllowedAlterView(void) const;
|
||||
bool isAllowedAlterSelection(void) const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void closeDialog();
|
||||
void showTaskView();
|
||||
|
||||
private Q_SLOTS:
|
||||
/// This get called by the TaskView when the Dialog is finished
|
||||
void closedDialog();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user