修复bug

This commit is contained in:
DESKTOP-7I8SUIC\zhang 2025-12-08 17:29:01 +08:00
parent d64e70bf07
commit 180f70218b
2 changed files with 8 additions and 5 deletions

View File

@ -584,20 +584,22 @@ void ConfigMgr::Save(QString & file_path) {
for(int var = 0 ; var < 10;++var){
if(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("vote",ptr->single_relay[ch].vote);
}
}
channel_item.insert("logic_vote", array_logic);
channel_item.insert("vote",ptr->single_relay[ch].vote);
}else{
if(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("vote",ptr->single_relay[ch].vote);
channel_item.insert("active", ptr->single_relay[ch].active);
channel_item.insert("group",ptr->single_relay[ch].group);
}
}
channel_item.insert("active", ptr->single_relay[ch].active);
channel_item.insert("group",ptr->single_relay[ch].group);
}else if(card_type_[i] == kCardRelaySingleNOK){
std::shared_ptr<CardBase> base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot);
if (base_ptr == nullptr) {

View File

@ -288,6 +288,7 @@ void SingleRelay::on_pushButton_confirm_clicked()
}else{
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].group = ui->comboBox_group->currentIndex() + 1;
relay_data->single_relay[current_index].count_vote = ui->lineEdit_vote_count->text().toInt();