Mackie Control, Fix sends after monitor not showing.
[ardour.git] / libs / surfaces / mackie / device_profile.cc
index 46e13f90b8c26aaca9f34436537a6a5bee3bab98..2b9cbd5edb2d462a933fd5d2d61cfabdd7d5db39 100644 (file)
@@ -90,7 +90,6 @@ devprofile_filter (const string &str, void* /*arg*/)
 void
 DeviceProfile::reload_device_profiles ()
 {
-       DeviceProfile dp;
        vector<string> s;
        vector<string> devprofiles;
        Searchpath spath (devprofile_search_path());
@@ -105,6 +104,7 @@ DeviceProfile::reload_device_profiles ()
 
        for (vector<string>::iterator i = devprofiles.begin(); i != devprofiles.end(); ++i) {
                string fullpath = *i;
+               DeviceProfile dp; // has to be initial every loop or info from last added.
 
                XMLTree tree;
 
@@ -135,7 +135,7 @@ DeviceProfile::set_state (const XMLNode& node, int /* version */)
        }
 
        /* name is mandatory */
+
        if ((child = node.child ("Name")) == 0 || (prop = child->property ("value")) == 0) {
                return -1;
        } else {
@@ -339,7 +339,7 @@ DeviceProfile::save ()
        }
 
        fullpath = Glib::build_filename (fullpath, legalize_for_path (_name) + ".profile");
-       
+
        XMLTree tree;
        tree.set_root (&get_state());