+
+ } else {
+ //if there is no user file, then use an existing one from instant.xml
+ //NOTE: if you are loading an old session, this might come from the session's instant.xml
+ //Todo: in the next major version, we should probably stop doing the instant.xml check, and just use the new file
+ XMLNode* plugin_order;
+ if ((plugin_order = find_named_node (node, "PluginOrder")) != 0) {
+ store_current_favorite_order ();
+ std::list<string> order;
+ const XMLNodeList& kids = plugin_order->children("PluginInfo");
+ XMLNodeConstIterator i;
+ for (i = kids.begin(); i != kids.end(); ++i) {
+ std::string unique_id;
+ if ((*i)->get_property ("unique-id", unique_id)) {
+ order.push_back (unique_id);
+ if ((*i)->get_property ("expanded", yn)) {
+ favorite_ui_state[unique_id] = yn;
+ }
+ }
+ }
+
+ PluginStateSorter cmp (order);
+ favorite_order.sort (cmp);
+ sync_treeview_from_favorite_order ();
+ }