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:
@@ -746,6 +746,7 @@ TaskPrimitiveParameters::TaskPrimitiveParameters(ViewProviderPrimitive* Primitiv
|
||||
primitive = new TaskBoxPrimitives(PrimitiveView);
|
||||
Content.push_back(primitive);
|
||||
|
||||
/*
|
||||
// handle visibility automation differently to the default method
|
||||
auto customvisfunc = [] (bool opening_not_closing,
|
||||
const std::string &postfix,
|
||||
@@ -780,6 +781,8 @@ TaskPrimitiveParameters::TaskPrimitiveParameters(ViewProviderPrimitive* Primitiv
|
||||
}
|
||||
};
|
||||
parameter = new PartGui::TaskAttacher(PrimitiveView, nullptr, QString(), tr("Attachment"), customvisfunc);
|
||||
*/
|
||||
parameter = new PartGui::TaskAttacher(PrimitiveView, nullptr, QString(), tr("Attachment"));
|
||||
Content.push_back(parameter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user