Core / Assembly: Add a way for vp edit modes to be restored.

This commit is contained in:
PaddleStroke
2024-11-20 11:17:26 +01:00
committed by WandererFan
parent ad22aa3a8c
commit 3357baef99
3 changed files with 34 additions and 1 deletions

View File

@@ -221,6 +221,9 @@ bool ViewProviderAssembly::canDragObjectToTarget(App::DocumentObject* obj,
bool ViewProviderAssembly::setEdit(int mode)
{
if (mode == ViewProvider::Default) {
// Ask that this edit mode be restored. For example if it is quit to edit a sketch.
getDocument()->setEditRestore(true);
// Set the part as 'Activated' ie bold in the tree.
Gui::Command::doCommand(Gui::Command::Gui,
"appDoc = App.getDocument('%s')\n"