First claimChildren3D implementation and Starting PartItem implementation

This commit is contained in:
jriegel
2012-04-01 21:47:24 +02:00
committed by Stefan Tröger
parent d9b6c03304
commit 8eb0d198f8
11 changed files with 95 additions and 36 deletions

View File

@@ -107,20 +107,20 @@ void Workbench::activated()
addTaskWatcher(Watcher);
Gui::Control().showTaskView();
//App::Document *doc = App::GetApplication().getActiveDocument();
//if(!doc){
// // create a new document
App::Document *doc = App::GetApplication().getActiveDocument();
if(!doc){
// create a new document
// Gui::Command::doCommand(Gui::Command::Doc,"App.newDocument()");
// doc = App::GetApplication().getActiveDocument();
Gui::Command::doCommand(Gui::Command::Doc,"App.newDocument()");
doc = App::GetApplication().getActiveDocument();
//}
//// now we should have a document!
//assert(doc);
}
// now we should have a document!
assert(doc);
//if(doc->countObjects()==0){
// Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().addObject('Assembly::ItemAssembly','Product')");
//}
if(doc->countObjects()==0){
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().addObject('Assembly::ItemAssembly','Product')");
}
}