Inputs signal changes and LS try to solve timing crash
This commit is contained in:
@@ -197,9 +197,9 @@ void InputsPanel::gm_openExpo(int index)
|
|||||||
model->expoData[index] = ed;
|
model->expoData[index] = ed;
|
||||||
if (firmware->getCapability(VirtualInputs))
|
if (firmware->getCapability(VirtualInputs))
|
||||||
strncpy(model->inputNames[ed.chn], inputName.toLatin1().data(), INPUT_NAME_LEN);
|
strncpy(model->inputNames[ed.chn], inputName.toLatin1().data(), INPUT_NAME_LEN);
|
||||||
|
update();
|
||||||
emit updateDataModels();
|
emit updateDataModels();
|
||||||
emit modified();
|
emit modified();
|
||||||
update();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (expoInserted) {
|
if (expoInserted) {
|
||||||
@@ -252,8 +252,9 @@ void InputsPanel::exposDelete(bool prompt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
exposDeleteList(list, prompt);
|
exposDeleteList(list, prompt);
|
||||||
emit modified();
|
|
||||||
update();
|
update();
|
||||||
|
emit updateDataModels();
|
||||||
|
emit modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputsPanel::exposCut()
|
void InputsPanel::exposCut()
|
||||||
@@ -326,8 +327,9 @@ void InputsPanel::pasteExpoMimeData(const QMimeData * mimeData, int destIdx)
|
|||||||
i += sizeof(ExpoData);
|
i += sizeof(ExpoData);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit modified();
|
|
||||||
update();
|
update();
|
||||||
|
emit updateDataModels();
|
||||||
|
emit modified();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,8 +496,9 @@ void InputsPanel::moveExpoList(bool down)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mod) {
|
if (mod) {
|
||||||
emit modified();
|
|
||||||
update();
|
update();
|
||||||
|
emit updateDataModels();
|
||||||
|
emit modified();
|
||||||
}
|
}
|
||||||
setSelectedByExpoList(highlightList);
|
setSelectedByExpoList(highlightList);
|
||||||
}
|
}
|
||||||
@@ -533,8 +536,9 @@ void InputsPanel::clearExpos()
|
|||||||
for (int i = 0; i < inputsCount; i++) {
|
for (int i = 0; i < inputsCount; i++) {
|
||||||
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_CLEAR, i);
|
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_CLEAR, i);
|
||||||
}
|
}
|
||||||
emit modified();
|
|
||||||
update();
|
update();
|
||||||
|
emit updateDataModels();
|
||||||
|
emit modified();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -582,6 +586,7 @@ void InputsPanel::cmInputClear()
|
|||||||
}
|
}
|
||||||
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_CLEAR, inputIdx);
|
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_CLEAR, inputIdx);
|
||||||
update();
|
update();
|
||||||
|
emit updateDataModels();
|
||||||
emit modified();
|
emit modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -605,6 +610,7 @@ void InputsPanel::cmInputDelete()
|
|||||||
|
|
||||||
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_SHIFT, inputIdx, 0, -1);
|
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_SHIFT, inputIdx, 0, -1);
|
||||||
update();
|
update();
|
||||||
|
emit updateDataModels();
|
||||||
emit modified();
|
emit modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -623,6 +629,7 @@ void InputsPanel::cmInputInsert()
|
|||||||
|
|
||||||
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_SHIFT, inputIdx, 0, 1);
|
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_SHIFT, inputIdx, 0, 1);
|
||||||
update();
|
update();
|
||||||
|
emit updateDataModels();
|
||||||
emit modified();
|
emit modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -684,6 +691,7 @@ void InputsPanel::cmInputSwapData(int idx1, int idx2)
|
|||||||
|
|
||||||
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_SWAP, idx1, idx2);
|
model->updateAllReferences(ModelData::REF_UPD_TYPE_INPUT, ModelData::REF_UPD_ACT_SWAP, idx1, idx2);
|
||||||
update();
|
update();
|
||||||
|
emit updateDataModels();
|
||||||
emit modified();
|
emit modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -169,36 +169,33 @@ LogicalSwitchesPanel::~LogicalSwitchesPanel()
|
|||||||
|
|
||||||
void LogicalSwitchesPanel::onFunctionChanged()
|
void LogicalSwitchesPanel::onFunctionChanged()
|
||||||
{
|
{
|
||||||
int i = sender()->property("index").toInt();
|
if (!lock) {
|
||||||
unsigned newFunc = cbFunction[i]->currentData().toUInt();
|
int i = sender()->property("index").toInt();
|
||||||
|
unsigned newFunc = cbFunction[i]->currentData().toUInt();
|
||||||
|
|
||||||
if (model->logicalSw[i].func == newFunc)
|
if (model->logicalSw[i].func == newFunc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const unsigned oldFunc = model->logicalSw[i].func;
|
const unsigned oldFunc = model->logicalSw[i].func;
|
||||||
CSFunctionFamily oldFuncFamily = model->logicalSw[i].getFunctionFamily();
|
CSFunctionFamily oldFuncFamily = model->logicalSw[i].getFunctionFamily();
|
||||||
model->logicalSw[i].func = newFunc;
|
|
||||||
CSFunctionFamily newFuncFamily = model->logicalSw[i].getFunctionFamily();
|
|
||||||
|
|
||||||
if (oldFuncFamily != newFuncFamily) {
|
|
||||||
model->logicalSw[i].clear();
|
|
||||||
model->logicalSw[i].func = newFunc;
|
model->logicalSw[i].func = newFunc;
|
||||||
if (newFuncFamily == LS_FAMILY_TIMER) {
|
CSFunctionFamily newFuncFamily = model->logicalSw[i].getFunctionFamily();
|
||||||
model->logicalSw[i].val1 = -119;
|
|
||||||
model->logicalSw[i].val2 = -119;
|
|
||||||
}
|
|
||||||
else if (newFuncFamily == LS_FAMILY_EDGE) {
|
|
||||||
model->logicalSw[i].val2 = -129;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (bool(oldFunc) != bool(newFunc)) {
|
|
||||||
emit updateDataModels();
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
updateLine(i);
|
|
||||||
|
|
||||||
emit modified();
|
if (oldFuncFamily != newFuncFamily) {
|
||||||
|
model->logicalSw[i].clear();
|
||||||
|
model->logicalSw[i].func = newFunc;
|
||||||
|
if (newFuncFamily == LS_FAMILY_TIMER) {
|
||||||
|
model->logicalSw[i].val1 = -119;
|
||||||
|
model->logicalSw[i].val2 = -119;
|
||||||
|
}
|
||||||
|
else if (newFuncFamily == LS_FAMILY_EDGE) {
|
||||||
|
model->logicalSw[i].val2 = -129;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
updateLine(i);
|
||||||
|
emit modified();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogicalSwitchesPanel::onV1Changed(int value)
|
void LogicalSwitchesPanel::onV1Changed(int value)
|
||||||
@@ -353,7 +350,7 @@ void LogicalSwitchesPanel::updateLine(int i)
|
|||||||
cbFunction[i]->setCurrentIndex(cbFunction[i]->findData(model->logicalSw[i].func));
|
cbFunction[i]->setCurrentIndex(cbFunction[i]->findData(model->logicalSw[i].func));
|
||||||
cbAndSwitch[i]->setCurrentIndex(cbAndSwitch[i]->findData(RawSwitch(model->logicalSw[i].andsw).toValue()));
|
cbAndSwitch[i]->setCurrentIndex(cbAndSwitch[i]->findData(RawSwitch(model->logicalSw[i].andsw).toValue()));
|
||||||
|
|
||||||
if (!model->logicalSw[i].func) {
|
if (model->logicalSw[i].isEmpty()) {
|
||||||
mask = 0;
|
mask = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user