Skip to content

Commit

Permalink
Only set a mapping dirty if the change is visible in the xml file.
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Jan 10, 2025
1 parent c70ca6f commit f12d785
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controllers/midi/legacymidicontrollermapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ bool LegacyMidiControllerMapping::isMappable() const {

void LegacyMidiControllerMapping::addInputMapping(uint16_t key, const MidiInputMapping& mapping) {
m_inputMappings.insert(key, mapping);
setDirty(true);
if (!std::holds_alternative<std::shared_ptr<QJSValue>>(mapping.control)) {
// Note: JS handler are not saved to the XML file
setDirty(true);
}
}

void LegacyMidiControllerMapping::removeInputMapping(uint16_t key) {
Expand Down

0 comments on commit f12d785

Please sign in to comment.