Commit 75abd8c3 authored by Alexander Wiebel's avatar Alexander Wiebel

[FIX #455] somehow miss thes before the merge

parent aaf5428e
......@@ -113,7 +113,15 @@ public:
*
* \param notifier the notifier function
*/
void addChangeNotifier( boost::function< void() > notifier );
void addChangeNotifier( boost::shared_ptr< boost::function< void() > > notifier );
/**
* Remove a specified notifier from the list of default notifiers which get connected to each roi.
*
* \param notifier the notifier function
*/
void removeChangeNotifier( boost::shared_ptr< boost::function< void() > > notifier );
protected:
/**
......@@ -173,7 +181,8 @@ protected:
/**
* The notifiers connected to added rois by default.
*/
std::list< boost::function< void() > > m_changeNotifiers;
std::list< boost::shared_ptr< boost::function< void() > > > m_changeNotifiers;
/**
* Lock for associated notifiers set.
......
......@@ -193,11 +193,17 @@ int WQt4Gui::run()
t_GenericSignalHandlerType connectionClosedSignal = boost::bind( &WQt4Gui::slotConnectionClosed, this, _1, _2 );
m_kernel->getRootContainer()->addDefaultNotifier( CONNECTION_CLOSED, connectionClosedSignal );
boost::function< void( osg::ref_ptr< WROI > ) > assocRoiSignal =
boost::bind( &WQt4Gui::slotAddRoiToTree, this, _1 );
boost::shared_ptr< boost::function< void( osg::ref_ptr< WROI > ) > > assocRoiSignal;
assocRoiSignal =
boost::shared_ptr< boost::function< void( osg::ref_ptr< WROI > ) > >(
new boost::function< void( osg::ref_ptr< WROI > ) > ( boost::bind( &WQt4Gui::slotAddRoiToTree, this, _1 ) ) );
m_kernel->getRoiManager()->addAddNotifier( assocRoiSignal );
boost::function< void( osg::ref_ptr< WROI > ) > removeRoiSignal =
boost::bind( &WQt4Gui::slotRemoveRoiFromTree, this, _1 );
boost::shared_ptr< boost::function< void( osg::ref_ptr< WROI > ) > > removeRoiSignal;
removeRoiSignal =
boost::shared_ptr< boost::function< void( osg::ref_ptr< WROI > ) > >(
new boost::function< void( osg::ref_ptr< WROI > ) > ( boost::bind( &WQt4Gui::slotRemoveRoiFromTree, this, _1 ) ) );
m_kernel->getRoiManager()->addRemoveNotifier( removeRoiSignal );
// now we are initialized
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment