Fix #970 by making sure the session state handler can be called
authorSoeren Apel <soeren@apelpie.net>
Wed, 7 Jun 2017 16:18:24 +0000 (18:18 +0200)
committerSoeren Apel <soeren@apelpie.net>
Wed, 7 Jun 2017 16:18:24 +0000 (18:18 +0200)
Before, the session did call Session::stop_capture() and fired
the signal to notify of its capture state change. However, the
Session object was deleted before the next run of the Qt event
loop. As the Qt event loop dismisses signals originating from
deleted objects, the connected event handler
MainWindow::on_capture_state_changed() was never called.

To remedy this, we call Session::stop_capture() before the
destruction of the object and force a run of the event loop
immediately afterwards. This way, the event handler is called
and the run/stop button updated properly.


No differences found