mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-26 03:11:21 +08:00
fix route outbound selector
This commit is contained in:
parent
1dcbdcac18
commit
99072a815b
@ -430,6 +430,10 @@ namespace NekoGui {
|
|||||||
{
|
{
|
||||||
strategy = value[0];
|
strategy = value[0];
|
||||||
}
|
}
|
||||||
|
if (fieldName == "outbound")
|
||||||
|
{
|
||||||
|
outboundID = value[0].toInt();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RouteRule::isEmpty() {
|
bool RouteRule::isEmpty() {
|
||||||
|
|||||||
@ -243,6 +243,12 @@ RouteItem::RouteItem(QWidget *parent, const std::shared_ptr<NekoGui::RoutingChai
|
|||||||
|
|
||||||
connect(ui->rule_attr_selector, &QComboBox::currentTextChanged, this, [=](const QString& text){
|
connect(ui->rule_attr_selector, &QComboBox::currentTextChanged, this, [=](const QString& text){
|
||||||
if (currentIndex == -1) return;
|
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)});
|
chain->Rules[currentIndex]->set_field_value(ui->rule_attr->currentText(), {QString(text)});
|
||||||
updateRulePreview();
|
updateRulePreview();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user