diff --git a/resources/data/configuration.xml b/resources/data/configuration.xml index 91900e42871..c43c1179aff 100644 --- a/resources/data/configuration.xml +++ b/resources/data/configuration.xml @@ -19,7 +19,7 @@ - + @@ -30,10 +30,6 @@ - - - - @@ -68,6 +64,9 @@ + + + diff --git a/src/common/gui/CSnapshotMenu.cpp b/src/common/gui/CSnapshotMenu.cpp index bd3828ea3f9..dc1bc266017 100644 --- a/src/common/gui/CSnapshotMenu.cpp +++ b/src/common/gui/CSnapshotMenu.cpp @@ -71,10 +71,16 @@ void CSnapshotMenu::populateSubmenuFromTypeElement(TiXmlElement *type, VSTGUI::C while (snapshot) { strcpy(txt, snapshot->Attribute("name")); + int snapshotTypeID = type_id; + int tmpI; + if (snapshot->Attribute("i", &tmpI) != nullptr) + { + snapshotTypeID = tmpI; + } auto actionItem = new CCommandMenuItem(CCommandMenuItem::Desc(txt)); - auto action = [this, snapshot, type_id](CCommandMenuItem* item) { - this->loadSnapshot(type_id, snapshot); + auto action = [this, snapshot, snapshotTypeID](CCommandMenuItem* item) { + this->loadSnapshot(snapshotTypeID, snapshot); }; actionItem->setActions(action, nullptr); @@ -286,9 +292,6 @@ void CFxMenu::loadSnapshot(int type, TiXmlElement* e) fxbuffer->type.val.i = type; if (e) { - TiXmlElement* p = TINYXML_SAFE_TO_ELEMENT(e->Parent()); - p->QueryIntAttribute("i", &type); - assert(within_range(0, type, num_fxtypes)); fxbuffer->type.val.i = type; // storage->patch.update_controls();