diff --git a/gtk2_ardour/gui_object.cc b/gtk2_ardour/gui_object.cc index 84c9fe7c67..3e21f82fa4 100644 --- a/gtk2_ardour/gui_object.cc +++ b/gtk2_ardour/gui_object.cc @@ -38,6 +38,7 @@ GUIObjectState::get_node (const XMLNode* parent, const string& id) { XMLNodeList const & children = parent->children (); for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) { + if ((*i)->name() != X_("Object")) { continue; } @@ -81,6 +82,7 @@ string GUIObjectState::get_string (const string& id, const string& prop_name, bool* empty) { XMLNode* child = get_node (&_state, id); + if (!child) { if (empty) { *empty = true; @@ -126,13 +128,6 @@ GUIObjectState::load (const XMLNode& node) (void) set_state (node); } -GUIObjectState& -GUIObjectState::operator= (const GUIObjectState& other) -{ - _state = other._state; - return *this; -} - std::list GUIObjectState::all_ids () const { diff --git a/gtk2_ardour/gui_object.h b/gtk2_ardour/gui_object.h index 694a5e9212..dd56f4b34c 100644 --- a/gtk2_ardour/gui_object.h +++ b/gtk2_ardour/gui_object.h @@ -34,15 +34,13 @@ class GUIObjectState { public: GUIObjectState (); - + XMLNode& get_state () const; int set_state (const XMLNode&); static const std::string xml_node_name; void load (const XMLNode&); - GUIObjectState& operator= (const GUIObjectState& other); - std::string get_string (const std::string& id, const std::string& prop_name, bool* empty = 0); template void set (const std::string& id, const std::string& prop_name, const T& val) { @@ -59,7 +57,6 @@ public: static XMLNode* get_or_add_node (XMLNode *, const std::string &); private: - XMLNode _state; };