PartGui: avoid code duplication for handing TaskAttacher
A better fix for #0004188 Delay calling setPreviewDisplayMode() in ViewProviderPrimitive::setEdit also fixed issue of not turning off preview mode if the user cancels editing because there is already a task dialog active.
This commit is contained in:
@@ -81,8 +81,6 @@ void ViewProviderPrimitive::setupContextMenu(QMenu* menu, QObject* receiver, con
|
||||
bool ViewProviderPrimitive::setEdit(int ModNum)
|
||||
{
|
||||
if (ModNum == ViewProvider::Default ) {
|
||||
setPreviewDisplayMode(true);
|
||||
|
||||
// When double-clicking on the item for this fillet the
|
||||
// object unsets and sets its edit mode without closing
|
||||
// the task panel
|
||||
@@ -114,6 +112,8 @@ bool ViewProviderPrimitive::setEdit(int ModNum)
|
||||
else
|
||||
Gui::Control().showDialog(new TaskPrimitiveParameters(this));
|
||||
|
||||
setPreviewDisplayMode(true);
|
||||
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user