503
512
const std::vector<App::Document*> docs = App::GetApplication().getDocuments();
504
513
for (std::vector<App::Document*>::const_iterator it = docs.begin(); it != docs.end(); ++it) {
505
514
Document *pcDoc = Application::Instance->getDocument(*it);
506
const std::vector<App::DocumentObject*> sel = Selection().getObjectsOfType
515
std::vector<App::DocumentObject*> sel = Selection().getObjectsOfType
507
516
(App::DocumentObject::getClassTypeId(), (*it)->getName());
508
for(std::vector<App::DocumentObject*>::const_iterator ft=sel.begin();ft!=sel.end();ft++) {
518
// in case a group object and an object of the group is selected then ignore the group object
519
std::vector<App::DocumentObject*> ignore;
520
for (std::vector<App::DocumentObject*>::iterator ft=sel.begin();ft!=sel.end();ft++) {
521
if ((*ft)->getTypeId().isDerivedFrom(App::DocumentObjectGroup::getClassTypeId())) {
522
App::DocumentObjectGroup* grp = static_cast<App::DocumentObjectGroup*>(*ft);
523
std::vector<App::DocumentObject*> sub = grp->Group.getValues();
524
for (std::vector<App::DocumentObject*>::iterator st = sub.begin(); st != sub.end(); ++st) {
525
if (std::find(sel.begin(), sel.end(), *st) != sel.end()) {
526
ignore.push_back(*ft);
533
if (!ignore.empty()) {
534
std::sort(sel.begin(), sel.end());
535
std::sort(ignore.begin(), ignore.end());
536
std::vector<App::DocumentObject*> diff;
537
std::back_insert_iterator<std::vector<App::DocumentObject*> > biit(diff);
538
std::set_difference(sel.begin(), sel.end(), ignore.begin(), ignore.end(), biit);
542
for (std::vector<App::DocumentObject*>::const_iterator ft=sel.begin();ft!=sel.end();ft++) {
509
543
if (pcDoc && pcDoc->isShow((*ft)->getNameInDocument()))
510
544
doCommand(Gui,"Gui.getDocument(\"%s\").getObject(\"%s\").Visibility=False"
511
545
, (*it)->getName(), (*ft)->getNameInDocument());
1204
1238
sGroup = QT_TR_NOOP("Standard-View");
1205
1239
sMenuText = QT_TR_NOOP("Inventor example #2");
1206
sToolTipText = QT_TR_NOOP("Shows spheres an dragglights");
1240
sToolTipText = QT_TR_NOOP("Shows spheres and drag-lights");
1207
1241
sWhatsThis = "Std_ViewExamples";
1208
sStatusTip = QT_TR_NOOP("Shows spheres an dragglights");
1242
sStatusTip = QT_TR_NOOP("Shows spheres and drag-lights");
1209
1243
sPixmap = "Std_Tool2";