PartDesign: closing task dialog when exiting edit mode for Primitives
===================================================================== fixes #4241 Problem: PartDesignGui::ViewProvider is responsible for closing the tasks for most of PD features when exiting edit mode (i.e. unsetEdit()). For primitives, PartDesignGui::ViewProviderPrimitive is responsible, and neither does it or relies on its parent VP to do it when calling unsetEdit(). Solution: Make PartDesignGui::ViewProviderPrimitive::unsetEdit() rely on parent PartDesignGui::ViewProvider to tidy up, including closing the task dialog. Reference: This is the default stack call when closing a document while a PD task using PartDesignGui::Viewprovider is active:
This commit is contained in:
committed by
abdullahtahiriyo
parent
a1bf4ef5ea
commit
4fba18a5d1
@@ -123,8 +123,12 @@ bool ViewProviderPrimitive::setEdit(int ModNum)
|
||||
|
||||
void ViewProviderPrimitive::unsetEdit(int ModNum)
|
||||
{
|
||||
Q_UNUSED(ModNum);
|
||||
setPreviewDisplayMode(false);
|
||||
|
||||
// Rely on parent class to:
|
||||
// restitute old workbench (set setEdit above) and close the dialog if exiting editing
|
||||
PartDesignGui::ViewProvider::unsetEdit(ModNum);
|
||||
|
||||
}
|
||||
|
||||
void ViewProviderPrimitive::updateData(const App::Property* p) {
|
||||
|
||||
Reference in New Issue
Block a user