Diff of /branches/logical-instruments/rosegarden/src/base/Studio.cpp [r12860] .. [r12861] Maximize Restore

  Switch to side-by-side view

--- a/branches/logical-instruments/rosegarden/src/base/Studio.cpp
+++ b/branches/logical-instruments/rosegarden/src/base/Studio.cpp
@@ -25,8 +25,13 @@
 #include "misc/Strings.h"
 #include "Track.h"
 #include "Composition.h"
+#include "sequencer/RosegardenSequencer.h"
 
 #include <sstream>
+#include <string>
+
+#include <QString>
+
 
 using std::cerr;
 using std::endl;
@@ -119,6 +124,20 @@
 	}
     }
 }
+
+void
+Studio::
+resyncDeviceConnections(void)
+{
+    // Sync all the device connections
+    DeviceList *devices = getDevices();
+    for (uint i = 0; i < devices->size(); ++i) {
+        DeviceId id = (*devices)[i]->getId();
+        QString connection = RosegardenSequencer::getInstance()->getConnection(id);
+        (*devices)[i]->setConnection(qstrtostr(connection));
+    }
+}
+
 
 DeviceId
 Studio::getSpareDeviceId(InstrumentId &baseInstrumentId)