From 99072a815b1e084f2a6189e35a4e7cd00a299d75 Mon Sep 17 00:00:00 2001 From: Nova Date: Tue, 25 Feb 2025 16:13:44 +0330 Subject: [PATCH] fix route outbound selector --- src/dataStore/RouteEntity.cpp | 4 ++++ src/ui/setting/RouteItem.cpp | 6 ++++++ 2 files changed, 10 insertions(+) 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(); });