diff options
Diffstat (limited to 'Swift/Controllers/EventWindowController.cpp')
-rw-r--r-- | Swift/Controllers/EventWindowController.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Swift/Controllers/EventWindowController.cpp b/Swift/Controllers/EventWindowController.cpp index 4bc5c22..a6611fc 100644 --- a/Swift/Controllers/EventWindowController.cpp +++ b/Swift/Controllers/EventWindowController.cpp @@ -11,8 +11,18 @@ EventWindowController::EventWindowController(EventController* eventController, E eventController_->onEventQueueEventAdded.connect(boost::bind(&EventWindowController::handleEventQueueEventAdded, this, _1)); } +EventWindowController::~EventWindowController() { + delete window_; +} + void EventWindowController::handleEventQueueEventAdded(boost::shared_ptr<Event> event) { + event->onConclusion.connect(boost::bind(&EventWindowController::handleEventConcluded, this, event)); window_->addEvent(event, true); } +void EventWindowController::handleEventConcluded(boost::shared_ptr<Event> event) { + window_->removeEvent(event); + window_->addEvent(event, false); +} + } |