Skip to content

Commit

Permalink
fixes #4233: Access violation and file corruption on undo duplicate s…
Browse files Browse the repository at this point in the history
…ketch
  • Loading branch information
wwmayer committed Dec 24, 2019
1 parent 061439e commit 0464165
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Mod/PartDesign/Gui/CommandBody.cpp
Expand Up @@ -643,9 +643,11 @@ void CmdPartDesignDuplicateSelection::activated(int iMsg)

std::vector<App::DocumentObject*> beforeFeatures = getDocument()->getObjects();

openCommand("Duplicate a PartDesign object");
doCommand(Doc,"FreeCADGui.runCommand('Std_DuplicateSelection')");

// This transaction must be opened after using the core duplication function.
// See https://forum.freecadweb.org/viewtopic.php?f=19&t=41918&p=355939#p355939
openCommand("Duplicate a PartDesign object");
if (pcActiveBody) {
// Find the features that were added
std::vector<App::DocumentObject*> afterFeatures = getDocument()->getObjects();
Expand Down

0 comments on commit 0464165

Please sign in to comment.