修复bug
This commit is contained in:
parent
d64e70bf07
commit
180f70218b
@ -584,20 +584,22 @@ void ConfigMgr::Save(QString & file_path) {
|
|||||||
for(int var = 0 ; var < 10;++var){
|
for(int var = 0 ; var < 10;++var){
|
||||||
if(ptr->single_relay[ch].logic[var] != ""){
|
if(ptr->single_relay[ch].logic[var] != ""){
|
||||||
array_logic.append(ptr->single_relay[ch].logic[var]);
|
array_logic.append(ptr->single_relay[ch].logic[var]);
|
||||||
}
|
channel_item.insert("active", ptr->single_relay[ch].active);
|
||||||
}
|
channel_item.insert("group",ptr->single_relay[ch].group);
|
||||||
channel_item.insert("logic_vote", array_logic);
|
channel_item.insert("logic_vote", array_logic);
|
||||||
channel_item.insert("vote",ptr->single_relay[ch].vote);
|
channel_item.insert("vote",ptr->single_relay[ch].vote);
|
||||||
|
}
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
if(ptr->single_relay[ch].logic_expression != ""){
|
if(ptr->single_relay[ch].logic_expression != ""){
|
||||||
qDebug() << "ch" << ch << ptr->single_relay[ch].logic_expression;
|
qDebug() << "ch" << ch << ptr->single_relay[ch].logic_expression;
|
||||||
channel_item.insert("logic_expression", ptr->single_relay[ch].logic_expression);
|
channel_item.insert("logic_expression", ptr->single_relay[ch].logic_expression);
|
||||||
channel_item.insert("vote",ptr->single_relay[ch].vote);
|
channel_item.insert("vote",ptr->single_relay[ch].vote);
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
channel_item.insert("active", ptr->single_relay[ch].active);
|
channel_item.insert("active", ptr->single_relay[ch].active);
|
||||||
channel_item.insert("group",ptr->single_relay[ch].group);
|
channel_item.insert("group",ptr->single_relay[ch].group);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}else if(card_type_[i] == kCardRelaySingleNOK){
|
}else if(card_type_[i] == kCardRelaySingleNOK){
|
||||||
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot);
|
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot);
|
||||||
if (base_ptr == nullptr) {
|
if (base_ptr == nullptr) {
|
||||||
|
|||||||
@ -288,6 +288,7 @@ void SingleRelay::on_pushButton_confirm_clicked()
|
|||||||
}else{
|
}else{
|
||||||
relay_data->single_relay[current_index].logic_expression = finalExpr;
|
relay_data->single_relay[current_index].logic_expression = finalExpr;
|
||||||
}
|
}
|
||||||
|
relay_data->single_relay[current_index].active = ui->checkBox_active->isChecked();
|
||||||
relay_data->single_relay[current_index].vote = ui->checkBox_vote->isChecked();
|
relay_data->single_relay[current_index].vote = ui->checkBox_vote->isChecked();
|
||||||
relay_data->single_relay[current_index].group = ui->comboBox_group->currentIndex() + 1;
|
relay_data->single_relay[current_index].group = ui->comboBox_group->currentIndex() + 1;
|
||||||
relay_data->single_relay[current_index].count_vote = ui->lineEdit_vote_count->text().toInt();
|
relay_data->single_relay[current_index].count_vote = ui->lineEdit_vote_count->text().toInt();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user