From 8ec91d29dd5604302ec4ce799e332cf91e61576c Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 21 May 2012 14:08:57 +0200 Subject: [PATCH] Workaround for linker error with MSVC --- src/Gui/Tree.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index 2c5f0ea15..ba3672d8c 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -431,6 +431,7 @@ void TreeWidget::dropEvent(QDropEvent *event) // Open command App::Document* doc = grp->getDocument(); Gui::Document* gui = Gui::Application::Instance->getDocument(doc); + Base::Type DOGPython = Base::Type::fromName("App::DocumentObjectGroupPython"); gui->openCommand("Move object"); for (QList::Iterator it = items.begin(); it != items.end(); ++it) { // get document object @@ -441,7 +442,7 @@ void TreeWidget::dropEvent(QDropEvent *event) if (par) { // allow an object to be in one group only QString cmd; - if (par->getTypeId().isDerivedFrom(App::DocumentObjectGroupPython::getClassTypeId())) { + if (par->getTypeId().isDerivedFrom(DOGPython)) { // if this is a python group, call the method of its Proxy cmd = QString::fromAscii("App.getDocument(\"%1\").getObject(\"%2\").Proxy.removeObject(" "App.getDocument(\"%1\").getObject(\"%3\"))") @@ -460,7 +461,7 @@ void TreeWidget::dropEvent(QDropEvent *event) // build Python command for execution QString cmd; - if (grp->getTypeId().isDerivedFrom(App::DocumentObjectGroupPython::getClassTypeId())) { + if (grp->getTypeId().isDerivedFrom(DOGPython)) { cmd = QString::fromAscii("App.getDocument(\"%1\").getObject(\"%2\").Proxy.addObject(" "App.getDocument(\"%1\").getObject(\"%3\"))") .arg(QString::fromAscii(doc->getName()))