diff --git a/Source/lumatone_editor_library/data/application_state.cpp b/Source/lumatone_editor_library/data/application_state.cpp index 806ec82..f4bb272 100644 --- a/Source/lumatone_editor_library/data/application_state.cpp +++ b/Source/lumatone_editor_library/data/application_state.cpp @@ -22,7 +22,7 @@ LumatoneApplicationState::LumatoneApplicationState(juce::String nameIn, Lumatone : LumatoneState(nameIn, stateIn, undoManagerIn) { layoutContext = std::make_shared(*mappingData); - controller = std::make_shared(*this, driverIn, undoManagerIn); + controller = std::make_shared(*this, driverIn); colourModel = std::make_shared(); editorListeners.reset(new juce::ListenerList()); @@ -41,8 +41,8 @@ LumatoneApplicationState::LumatoneApplicationState(juce::String nameIn, Lumatone // loadStateProperties(state); // } -LumatoneApplicationState::LumatoneApplicationState(juce::String nameIn, const LumatoneApplicationState &stateIn, juce::UndoManager *undoManagerIn) - : LumatoneState(nameIn, (const LumatoneState&)stateIn, undoManagerIn) +LumatoneApplicationState::LumatoneApplicationState(juce::String nameIn, const LumatoneApplicationState &stateIn) + : LumatoneState(nameIn, (const LumatoneState&)stateIn) , layoutContext(stateIn.layoutContext) , controller(stateIn.controller) , colourModel(stateIn.colourModel) diff --git a/Source/lumatone_editor_library/data/application_state.h b/Source/lumatone_editor_library/data/application_state.h index fdaed05..45178e9 100644 --- a/Source/lumatone_editor_library/data/application_state.h +++ b/Source/lumatone_editor_library/data/application_state.h @@ -54,7 +54,7 @@ class LumatoneApplicationState : public LumatoneState { public: LumatoneApplicationState(juce::String nameIn, LumatoneFirmwareDriver& driverIn, juce::ValueTree stateIn=juce::ValueTree(), juce::UndoManager* undoManager=nullptr); - LumatoneApplicationState(juce::String nameIn, const LumatoneApplicationState& stateIn, juce::UndoManager* undoManager=nullptr); + LumatoneApplicationState(juce::String nameIn, const LumatoneApplicationState& stateIn); virtual ~LumatoneApplicationState(); diff --git a/Source/lumatone_editor_library/data/lumatone_state.cpp b/Source/lumatone_editor_library/data/lumatone_state.cpp index 775b7a8..4cde442 100644 --- a/Source/lumatone_editor_library/data/lumatone_state.cpp +++ b/Source/lumatone_editor_library/data/lumatone_state.cpp @@ -39,8 +39,8 @@ LumatoneState::LumatoneState(juce::String nameIn, juce::ValueTree stateIn, juce: state.appendChild(layoutState, nullptr); } -LumatoneState::LumatoneState(juce::String nameIn, const LumatoneState& stateToCopy, juce::UndoManager* undoManagerIn) - : LumatoneState(nameIn, stateToCopy.state, undoManagerIn) +LumatoneState::LumatoneState(juce::String nameIn, const LumatoneState& stateToCopy) + : LumatoneState(nameIn, stateToCopy.state, stateToCopy.undoManager) { mappingData = stateToCopy.mappingData; midiKeyMap = stateToCopy.midiKeyMap; diff --git a/Source/lumatone_editor_library/data/lumatone_state.h b/Source/lumatone_editor_library/data/lumatone_state.h index e6141ca..7fd32bc 100644 --- a/Source/lumatone_editor_library/data/lumatone_state.h +++ b/Source/lumatone_editor_library/data/lumatone_state.h @@ -40,7 +40,7 @@ class LumatoneState : public LumatoneStateBase public: LumatoneState(juce::String nameIn, juce::ValueTree stateIn=juce::ValueTree(), juce::UndoManager* undoManager=nullptr); - LumatoneState(juce::String nameIn, const LumatoneState& stateToCopy, juce::UndoManager* undoManagerIn=nullptr); + LumatoneState(juce::String nameIn, const LumatoneState& stateToCopy); virtual ~LumatoneState() override; diff --git a/Source/lumatone_editor_library/device/lumatone_controller.cpp b/Source/lumatone_editor_library/device/lumatone_controller.cpp index b2e67be..1ca0173 100644 --- a/Source/lumatone_editor_library/device/lumatone_controller.cpp +++ b/Source/lumatone_editor_library/device/lumatone_controller.cpp @@ -15,8 +15,8 @@ #include "../lumatone_midi_driver/lumatone_midi_driver.h" #include "../listeners/editor_listener.h" -LumatoneController::LumatoneController(const LumatoneApplicationState& stateIn, LumatoneFirmwareDriver& firmwareDriverIn, juce::UndoManager* undoManager) - : LumatoneApplicationState("LumatoneController", stateIn, undoManager) +LumatoneController::LumatoneController(const LumatoneApplicationState& stateIn, LumatoneFirmwareDriver& firmwareDriverIn) + : LumatoneApplicationState("LumatoneController", stateIn) , LumatoneApplicationMidiController(stateIn, firmwareDriverIn) , firmwareDriver(firmwareDriverIn) , updateBuffer(firmwareDriverIn, stateIn) @@ -645,17 +645,6 @@ void LumatoneController::onConnectionConfirmed() statusListeners->call(&LumatoneEditor::StatusListener::connectionStateChanged, ConnectionState::ONLINE); } -// bool LumatoneController::loadLayoutFromFile(const juce::File& file) -// { -// const bool loaded = LumatoneState::loadLayoutFromFile(file); -// if (loaded) -// { -// sendCompleteMapping(*mappingData, true, false); -// } - -// return loaded; -// } - void LumatoneController::handleStatePropertyChange(juce::ValueTree stateIn, const juce::Identifier &property) { LumatoneApplicationState::handleStatePropertyChange(stateIn, property); diff --git a/Source/lumatone_editor_library/device/lumatone_controller.h b/Source/lumatone_editor_library/device/lumatone_controller.h index a3025e7..323636d 100644 --- a/Source/lumatone_editor_library/device/lumatone_controller.h +++ b/Source/lumatone_editor_library/device/lumatone_controller.h @@ -34,7 +34,7 @@ class LumatoneController : private LumatoneApplicationState { public: - LumatoneController(const LumatoneApplicationState& stateIn, LumatoneFirmwareDriver& firmwareDriverIn, juce::UndoManager* undoManager); + LumatoneController(const LumatoneApplicationState& stateIn, LumatoneFirmwareDriver& firmwareDriverIn); ~LumatoneController() override; juce::ValueTree loadStateProperties(juce::ValueTree stateIn) override;