13
0

allow invalidation-of-UI-request-by-object-deletion to work more often by setting the event loop record at connect time, not execution time

git-svn-id: svn://localhost/ardour2/branches/3.0@9379 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-04-19 16:07:10 +00:00
parent baa4de40ed
commit ee728d763d
2 changed files with 31 additions and 1 deletions

View File

@ -35,7 +35,7 @@ EventLoop::invalidate_request (void* data)
(*i)->invalidation = 0; (*i)->invalidation = 0;
} }
delete ir; delete ir;
} }
return 0; return 0;
} }

View File

@ -90,6 +90,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
clist.add_connection (_signal.connect (boost::bind (&EventLoop::call_slot, event_loop, ir, slot))); clist.add_connection (_signal.connect (boost::bind (&EventLoop::call_slot, event_loop, ir, slot)));
} }
@ -97,6 +100,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
c = _signal.connect (boost::bind (&EventLoop::call_slot, event_loop, ir, slot)); c = _signal.connect (boost::bind (&EventLoop::call_slot, event_loop, ir, slot));
} }
@ -134,6 +140,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1))); clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1)));
} }
@ -141,6 +150,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
c = _signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1)); c = _signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1));
} }
@ -181,6 +193,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2))); clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2)));
} }
@ -188,6 +203,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
c = _signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2)); c = _signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2));
} }
@ -227,6 +245,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3))); clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3)));
} }
@ -234,6 +255,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
c = _signal.connect (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3))); c = _signal.connect (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3)));
} }
@ -273,6 +297,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3, _4))); clist.add_connection (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3, _4)));
} }
@ -280,6 +307,9 @@ public:
PBD::EventLoop::InvalidationRecord* ir, PBD::EventLoop::InvalidationRecord* ir,
const typename SignalType::slot_function_type& slot, const typename SignalType::slot_function_type& slot,
PBD::EventLoop* event_loop) { PBD::EventLoop* event_loop) {
if (ir) {
ir->event_loop = event_loop;
}
c = _signal.connect (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3, _4))); c = _signal.connect (_signal.connect (boost::bind (&compositor, slot, event_loop, ir, _1, _2, _3, _4)));
} }