diff --git a/src/dataStore/RouteEntity.cpp b/src/dataStore/RouteEntity.cpp index c2f0693..0e1d002 100644 --- a/src/dataStore/RouteEntity.cpp +++ b/src/dataStore/RouteEntity.cpp @@ -430,6 +430,10 @@ namespace NekoGui { { strategy = value[0]; } + if (fieldName == "outbound") + { + outboundID = value[0].toInt(); + } } bool RouteRule::isEmpty() { diff --git a/src/ui/setting/RouteItem.cpp b/src/ui/setting/RouteItem.cpp index 67369b1..166075e 100644 --- a/src/ui/setting/RouteItem.cpp +++ b/src/ui/setting/RouteItem.cpp @@ -243,6 +243,12 @@ RouteItem::RouteItem(QWidget *parent, const std::shared_ptrrule_attr_selector, &QComboBox::currentTextChanged, this, [=](const QString& text){ if (currentIndex == -1) return; + if (ui->rule_attr->currentText() == "outbound") + { + chain->Rules[currentIndex]->set_field_value("outbound", {QString::number(outboundMap[ui->rule_attr_selector->currentIndex()])}); + updateRulePreview(); + return; + } chain->Rules[currentIndex]->set_field_value(ui->rule_attr->currentText(), {QString(text)}); updateRulePreview(); });