Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp

    r57a770 r3927ef  
    4242  connect(this, SIGNAL(atomInserted(const atom *)), worldscene, SLOT(atomInserted(const atom *)));
    4343  connect(this, SIGNAL(atomRemoved(const atom *)), worldscene, SLOT(atomRemoved(const atom *)));
     44  connect(this, SIGNAL(worldSelectionChanged()), worldscene, SLOT(worldSelectionChanged()));
     45  connect(this, SIGNAL(moleculeRemoved(const molecule *)), worldscene, SLOT(moleculeRemoved(const molecule *)));
    4446  connect(this, SIGNAL(changed()), this, SLOT(updateGL()));
    4547
     
    4850  World::getInstance().signOn(this, World::AtomInserted);
    4951  World::getInstance().signOn(this, World::AtomRemoved);
     52  World::getInstance().signOn(this, World::AtomPositionChanged);
     53  World::getInstance().signOn(this, World::MoleculeRemoved);
     54  World::getInstance().signOn(this, World::SelectionChanged);
    5055}
    5156
     
    5560  World::getInstance().signOff(this, World::AtomInserted);
    5661  World::getInstance().signOff(this, World::AtomRemoved);
     62  World::getInstance().signOff(this, World::AtomPositionChanged);
     63  World::getInstance().signOff(this, World::MoleculeRemoved);
     64  World::getInstance().signOff(this, World::SelectionChanged);
    5765  delete worldscene;
    5866}
     
    96104#endif
    97105      emit atomRemoved(_atom);
     106      break;
     107    }
     108    case World::AtomPositionChanged:
     109    {
     110      const atom *_atom = World::getInstance().lastChanged<atom>();
     111#ifdef LOG_OBSERVER
     112      observerLog().addMessage() << "++ Observer " << observerLog().getName(this) << " received notification that atom "+toString(_atom->getId())+" has changed its position.";
     113#endif
     114      emit changed();
     115      break;
     116    }
     117    case World::SelectionChanged:
     118    {
     119#ifdef LOG_OBSERVER
     120      observerLog().addMessage() << "++ Observer " << observerLog().getName(this) << " received notification that selection has changed.";
     121#endif
     122      emit worldSelectionChanged();
     123      break;
     124    }
     125    case World::MoleculeRemoved:
     126    {
     127      const molecule *_molecule = World::getInstance().lastChanged<molecule>();
     128#ifdef LOG_OBSERVER
     129      observerLog().addMessage() << "++ Observer " << observerLog().getName(this) << " received notification that molecule "+toString(_molecule->getId())+" has been removed.";
     130#endif
     131      emit moleculeRemoved(_molecule);
    98132      break;
    99133    }
Note: See TracChangeset for help on using the changeset viewer.