From 8079cf43d2ea84ec0eaa8baa35d3fbfa40d7ba1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Thu, 9 Feb 2017 22:17:36 +0100 Subject: [PATCH] Drag&Drop: Tree is responsible for undo/redo The user expects to undo the drag and drop action with a single click (as it happens with a single drag&drop action). Hence the command must be handled by the tree, not the viewproviders. --- src/Gui/ViewProviderGroupExtension.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Gui/ViewProviderGroupExtension.cpp b/src/Gui/ViewProviderGroupExtension.cpp index d8a5beeb6c..63ff4387dc 100644 --- a/src/Gui/ViewProviderGroupExtension.cpp +++ b/src/Gui/ViewProviderGroupExtension.cpp @@ -94,11 +94,9 @@ bool ViewProviderGroupExtension::extensionCanDropObject(App::DocumentObject* obj void ViewProviderGroupExtension::extensionDropObject(App::DocumentObject* obj) { - // Open command App::DocumentObject* grp = static_cast(getExtendedViewProvider()->getObject()); App::Document* doc = grp->getDocument(); Gui::Document* gui = Gui::Application::Instance->getDocument(doc); - gui->openCommand("Move object"); // build Python command for execution QString cmd; @@ -109,8 +107,6 @@ void ViewProviderGroupExtension::extensionDropObject(App::DocumentObject* obj) { .arg(QString::fromLatin1(obj->getNameInDocument())); Gui::Command::doCommand(Gui::Command::App, cmd.toUtf8()); - - gui->commitCommand(); } std::vector< App::DocumentObject* > ViewProviderGroupExtension::extensionClaimChildren(void) const {