tchnical commit
This commit is contained in:
parent
81b4bcd4af
commit
1ca23c33c7
|
@ -105,19 +105,8 @@ PartDesign::Body *Workbench::setUpPart(const App::Part *part)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void switchToDocument(const App::Document* doc)
|
||||
void Workbench::_doMigration(const App::Document* doc)
|
||||
{
|
||||
bool groupCreated = false;
|
||||
|
||||
|
||||
if (doc == NULL) return;
|
||||
|
||||
PartDesign::Body* activeBody = NULL;
|
||||
std::vector<App::DocumentObject*> bodies = doc->getObjectsOfType(PartDesign::Body::getClassTypeId());
|
||||
|
||||
// Is there a body feature in this document?
|
||||
if (bodies.empty()) {
|
||||
|
||||
if(doc->countObjects() != 0) {
|
||||
// show a warning about the convertion
|
||||
|
@ -321,7 +310,26 @@ void switchToDocument(const App::Document* doc)
|
|||
prevf = f;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
void Workbench::_switchToDocument(const App::Document* doc)
|
||||
{
|
||||
bool groupCreated = false;
|
||||
|
||||
|
||||
if (doc == NULL) return;
|
||||
|
||||
PartDesign::Body* activeBody = NULL;
|
||||
std::vector<App::DocumentObject*> bodies = doc->getObjectsOfType(PartDesign::Body::getClassTypeId());
|
||||
|
||||
// Is there a body feature in this document?
|
||||
if (bodies.empty())
|
||||
{
|
||||
_doMigration(doc);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Find active body
|
||||
for (std::vector<App::DocumentObject*>::const_iterator b = bodies.begin(); b != bodies.end(); b++) {
|
||||
PartDesign::Body* body = static_cast<PartDesign::Body*>(*b);
|
||||
|
|
|
@ -100,6 +100,10 @@ private:
|
|||
void slotDeleteDocument(const App::Document&);
|
||||
// Add new objects to the body, if appropriate
|
||||
//void slotNewObject(const App::DocumentObject& obj);
|
||||
|
||||
void _doMigration(const App::Document* doc);
|
||||
void _switchToDocument(const App::Document* doc);
|
||||
|
||||
};
|
||||
|
||||
} // namespace PartDesignGui
|
||||
|
|
Loading…
Reference in New Issue
Block a user