From 134af12646de0e06a3b50e1bd0347f3190fabf97 Mon Sep 17 00:00:00 2001 From: hsstraub Date: Sun, 13 Dec 2020 12:04:32 +0100 Subject: [PATCH] File extension *.ltn. Opening file -> marked as "not changed". --- Source/GeneralOptionsDlg.cpp | 8 ++++---- Source/Main.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/GeneralOptionsDlg.cpp b/Source/GeneralOptionsDlg.cpp index 72254f9d..b977bc8f 100644 --- a/Source/GeneralOptionsDlg.cpp +++ b/Source/GeneralOptionsDlg.cpp @@ -242,11 +242,11 @@ void GeneralOptionsDlg::loadFromMapping() { auto mappingInEdit = ((MainContentComponent*)getParentComponent())->getMappingInEdit(); - buttonAfterTouchActive->setToggleState(mappingInEdit.afterTouchActive, juce::NotificationType::sendNotification); - buttonLightOnKeyStrokes->setToggleState(mappingInEdit.lightOnKeyStrokes, juce::NotificationType::sendNotification); + buttonAfterTouchActive->setToggleState(mappingInEdit.afterTouchActive, juce::NotificationType::dontSendNotification); + buttonLightOnKeyStrokes->setToggleState(mappingInEdit.lightOnKeyStrokes, juce::NotificationType::dontSendNotification); - btnInvertFootCtrl->setToggleState(mappingInEdit.invertFootController, juce::NotificationType::sendNotification); - txtExprCtrlSensivity->setText(String(mappingInEdit.expressionControllerSensivity)); + btnInvertFootCtrl->setToggleState(mappingInEdit.invertFootController, juce::NotificationType::dontSendNotification); + txtExprCtrlSensivity->setText(String(mappingInEdit.expressionControllerSensivity), false); } //[/MiscUserCode] diff --git a/Source/Main.cpp b/Source/Main.cpp index 428a00fe..e0b31bf7 100644 --- a/Source/Main.cpp +++ b/Source/Main.cpp @@ -140,7 +140,7 @@ void TerpstraSysExApplication::anotherInstanceStarted(const String& commandLine) bool TerpstraSysExApplication::openSysExMapping() { - FileChooser chooser("Open a Lumatone key mapping", recentFiles.getFile(0).getParentDirectory(), "*.lmt"); + FileChooser chooser("Open a Lumatone key mapping", recentFiles.getFile(0).getParentDirectory(), "*.ltn"); if (chooser.browseForFileToOpen()) { currentFile = chooser.getResult(); @@ -160,7 +160,7 @@ bool TerpstraSysExApplication::saveSysExMapping() bool TerpstraSysExApplication::saveSysExMappingAs() { - FileChooser chooser("Lumatone Key Mapping Files", recentFiles.getFile(0).getParentDirectory(), "*.lmt"); + FileChooser chooser("Lumatone Key Mapping Files", recentFiles.getFile(0).getParentDirectory(), "*.ltn"); if (chooser.browseForFileToSave(true)) { currentFile = chooser.getResult(); @@ -320,15 +320,15 @@ bool TerpstraSysExApplication::openFromCurrentFile() ((MainContentComponent*)(mainWindow->getContentComponent()))->setData(keyMapping); - // Mark file as unchanged - setHasChangesToSave(false); - // Window title updateMainTitle(); - // Send configuraiton to controller, if connected + // Send configuration to controller, if connected sendCurrentMappingToDevice(); + // Mark file as unchanged + setHasChangesToSave(false); + // Add file to recent files list recentFiles.addFile(currentFile);