Input name saved only when clicking OK (Fixes #750)

This commit is contained in:
Andre Bernet
2014-03-16 11:32:14 +01:00
parent f30f1cef7f
commit 19d9c585f8
3 changed files with 14 additions and 6 deletions
+7 -1
View File
@@ -169,12 +169,18 @@ void InputsPanel::gm_openExpo(int index)
if(index<0 || index>=C9X_MAX_EXPOS) return;
ExpoData mixd(model.expoData[index]);
char inputName[4+1];
emit modified();
update();
if (GetEepromInterface()->getCapability(VirtualInputs))
strcpy(inputName, model.inputNames[mixd.chn]);
ExpoDialog *g = new ExpoDialog(this, model, &mixd, generalSettings.stickMode);
ExpoDialog *g = new ExpoDialog(this, model, &mixd, generalSettings.stickMode, inputName);
if (g->exec()) {
model.expoData[index] = mixd;
if (GetEepromInterface()->getCapability(VirtualInputs))
strcpy(model.inputNames[mixd.chn], inputName);
emit modified();
update();
}