Workaround for linker error with MSVC

This commit is contained in:
wmayer 2012-05-21 14:08:57 +02:00
parent 30cdaf8943
commit 8ec91d29dd

View File

@ -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<QTreeWidgetItem*>::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()))