Browse Source

Don't serialize module ID in module presets.

tags/v2.0.0
Andrew Belt 4 years ago
parent
commit
af65f7b8e7
2 changed files with 4 additions and 2 deletions
  1. +2
    -0
      src/app/ModuleWidget.cpp
  2. +2
    -2
      src/app/RackScrollWidget.cpp

+ 2
- 0
src/app/ModuleWidget.cpp View File

@@ -552,6 +552,8 @@ PortWidget* ModuleWidget::getOutput(int portId) {

json_t* ModuleWidget::toJson() {
json_t* moduleJ = APP->engine->moduleToJson(module);
// When serializing ModuleWidget, don't include the ID. This ID is only meaningful when serializing the entire rack.
json_object_del(moduleJ, "id");
return moduleJ;
}



+ 2
- 2
src/app/RackScrollWidget.cpp View File

@@ -102,9 +102,9 @@ void RackScrollWidget::onHoverKey(const event::HoverKey& e) {
float arrowSpeed = 30.0;
if ((e.mods & RACK_MOD_MASK) == (RACK_MOD_CTRL | GLFW_MOD_SHIFT))
arrowSpeed /= 16.0;
else if ((e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL)
if ((e.mods & RACK_MOD_MASK) == RACK_MOD_CTRL)
arrowSpeed *= 4.0;
else if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT)
if ((e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT)
arrowSpeed /= 4.0;

if (e.action == RACK_HELD) {


Loading…
Cancel
Save