Changes in src/World.cpp [ebc499:69643a]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/World.cpp
rebc499 r69643a 414 414 415 415 void World::clearAtomSelection(){ 416 OBSERVE; 417 NOTIFY(SelectionChanged); 416 418 selectedAtoms.clear(); 417 419 } … … 433 435 434 436 void World::selectAtom(const atom *_atom){ 437 OBSERVE; 438 NOTIFY(SelectionChanged); 435 439 // atom * is unchanged in this function, but we do store entity as changeable 436 440 ASSERT(_atom,"Invalid pointer in selection of atom"); … … 439 443 440 444 void World::selectAtom(const atomId_t id){ 445 OBSERVE; 446 NOTIFY(SelectionChanged); 441 447 ASSERT(atoms.count(id),"Atom Id selected that was not in the world"); 442 448 selectedAtoms[id]=atoms[id]; … … 444 450 445 451 void World::selectAllAtoms(AtomDescriptor descr){ 452 OBSERVE; 453 NOTIFY(SelectionChanged); 446 454 internal_AtomIterator begin = getAtomIter_internal(descr); 447 455 internal_AtomIterator end = atomEnd_internal(); … … 451 459 452 460 void World::selectAtomsOfMolecule(const molecule *_mol){ 461 OBSERVE; 462 NOTIFY(SelectionChanged); 453 463 ASSERT(_mol,"Invalid pointer to molecule in selection of Atoms of Molecule"); 454 464 // need to make it const to get the fast iterators … … 459 469 460 470 void World::selectAtomsOfMolecule(const moleculeId_t id){ 471 OBSERVE; 472 NOTIFY(SelectionChanged); 461 473 ASSERT(molecules.count(id),"No molecule with the given id upon Selection of atoms from molecule"); 462 474 selectAtomsOfMolecule(molecules[id]); … … 464 476 465 477 void World::unselectAtom(const atom *_atom){ 478 OBSERVE; 479 NOTIFY(SelectionChanged); 466 480 ASSERT(_atom,"Invalid pointer in unselection of atom"); 467 481 unselectAtom(_atom->getId()); … … 469 483 470 484 void World::unselectAtom(const atomId_t id){ 485 OBSERVE; 486 NOTIFY(SelectionChanged); 471 487 ASSERT(atoms.count(id),"Atom Id unselected that was not in the world"); 472 488 selectedAtoms.erase(id); … … 474 490 475 491 void World::unselectAllAtoms(AtomDescriptor descr){ 492 OBSERVE; 493 NOTIFY(SelectionChanged); 476 494 internal_AtomIterator begin = getAtomIter_internal(descr); 477 495 internal_AtomIterator end = atomEnd_internal(); … … 481 499 482 500 void World::unselectAtomsOfMolecule(const molecule *_mol){ 501 OBSERVE; 502 NOTIFY(SelectionChanged); 483 503 ASSERT(_mol,"Invalid pointer to molecule in selection of Atoms of Molecule"); 484 504 // need to make it const to get the fast iterators … … 489 509 490 510 void World::unselectAtomsOfMolecule(const moleculeId_t id){ 511 OBSERVE; 512 NOTIFY(SelectionChanged); 491 513 ASSERT(molecules.count(id),"No molecule with the given id upon Selection of atoms from molecule"); 492 514 unselectAtomsOfMolecule(molecules[id]); … … 521 543 522 544 void World::clearMoleculeSelection(){ 545 OBSERVE; 546 NOTIFY(SelectionChanged); 523 547 selectedMolecules.clear(); 524 548 } … … 541 565 542 566 void World::selectMolecule(const molecule *_mol){ 567 OBSERVE; 568 NOTIFY(SelectionChanged); 543 569 // molecule * is unchanged in this function, but we do store entity as changeable 544 570 ASSERT(_mol,"Invalid pointer to molecule in selection"); … … 547 573 548 574 void World::selectMolecule(const moleculeId_t id){ 575 OBSERVE; 576 NOTIFY(SelectionChanged); 549 577 ASSERT(molecules.count(id),"Molecule Id selected that was not in the world"); 550 578 selectedMolecules[id]=molecules[id]; … … 552 580 553 581 void World::selectAllMolecules(MoleculeDescriptor descr){ 582 OBSERVE; 583 NOTIFY(SelectionChanged); 554 584 internal_MoleculeIterator begin = getMoleculeIter_internal(descr); 555 585 internal_MoleculeIterator end = moleculeEnd_internal(); … … 559 589 560 590 void World::selectMoleculeOfAtom(const atom *_atom){ 591 OBSERVE; 592 NOTIFY(SelectionChanged); 561 593 ASSERT(_atom,"Invalid atom pointer in selection of MoleculeOfAtom"); 562 594 molecule *mol=_atom->getMolecule(); … … 568 600 569 601 void World::selectMoleculeOfAtom(const atomId_t id){ 602 OBSERVE; 603 NOTIFY(SelectionChanged); 570 604 ASSERT(atoms.count(id),"No such atom with given ID in selection of Molecules of Atom");\ 571 605 selectMoleculeOfAtom(atoms[id]); … … 573 607 574 608 void World::unselectMolecule(const molecule *_mol){ 609 OBSERVE; 610 NOTIFY(SelectionChanged); 575 611 ASSERT(_mol,"invalid pointer in unselection of molecule"); 576 612 unselectMolecule(_mol->getId()); … … 578 614 579 615 void World::unselectMolecule(const moleculeId_t id){ 616 OBSERVE; 617 NOTIFY(SelectionChanged); 580 618 ASSERT(molecules.count(id),"No such molecule with ID in unselection"); 581 619 selectedMolecules.erase(id); … … 583 621 584 622 void World::unselectAllMolecules(MoleculeDescriptor descr){ 623 OBSERVE; 624 NOTIFY(SelectionChanged); 585 625 internal_MoleculeIterator begin = getMoleculeIter_internal(descr); 586 626 internal_MoleculeIterator end = moleculeEnd_internal(); … … 590 630 591 631 void World::unselectMoleculeOfAtom(const atom *_atom){ 632 OBSERVE; 633 NOTIFY(SelectionChanged); 592 634 ASSERT(_atom,"Invalid atom pointer in selection of MoleculeOfAtom"); 593 635 molecule *mol=_atom->getMolecule(); … … 599 641 600 642 void World::unselectMoleculeOfAtom(const atomId_t id){ 643 OBSERVE; 644 NOTIFY(SelectionChanged); 601 645 ASSERT(atoms.count(id),"No such atom with given ID in selection of Molecules of Atom");\ 602 646 unselectMoleculeOfAtom(atoms[id]);
Note:
See TracChangeset
for help on using the changeset viewer.