Prevent Send::set_state being called twice when constructing InternalSends, thereby eliminating a warning about send ID.
git-svn-id: svn://localhost/ardour2/branches/3.0@6160 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3c04482a26
commit
94cdb91ec6
@ -57,6 +57,7 @@ class InternalSend : public Send
|
||||
|
||||
void send_to_going_away ();
|
||||
int connect_when_legal ();
|
||||
int set_our_state (XMLNode const &, int);
|
||||
};
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
@ -49,7 +49,8 @@ InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost:
|
||||
InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node)
|
||||
: Send (s, mm, node, Stateful::loading_state_version, Delivery::Aux /* will be reset in set_state() */)
|
||||
{
|
||||
set_state (node, Stateful::loading_state_version);
|
||||
/* Send constructor will set its state, so here we just need to set up our own */
|
||||
set_our_state (node, Stateful::loading_state_version);
|
||||
}
|
||||
|
||||
InternalSend::~InternalSend ()
|
||||
@ -170,12 +171,10 @@ InternalSend::get_state()
|
||||
}
|
||||
|
||||
int
|
||||
InternalSend::set_state (const XMLNode& node, int version)
|
||||
InternalSend::set_our_state (const XMLNode& node, int version)
|
||||
{
|
||||
const XMLProperty* prop;
|
||||
|
||||
Send::set_state (node, version);
|
||||
|
||||
if ((prop = node.property ("target")) != 0) {
|
||||
|
||||
_send_to_id = prop->value();
|
||||
@ -195,6 +194,13 @@ InternalSend::set_state (const XMLNode& node, int version)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
InternalSend::set_state (const XMLNode& node, int version)
|
||||
{
|
||||
Send::set_state (node, version);
|
||||
return set_our_state (node, version);
|
||||
}
|
||||
|
||||
int
|
||||
InternalSend::connect_when_legal ()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user