mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:50:12 +08:00
fix default route add
This commit is contained in:
parent
a078e9d7fc
commit
36736f23ee
@ -95,9 +95,9 @@ namespace NekoGui {
|
||||
NekoGui::profileManager->AddGroup(defaultGroup);
|
||||
}
|
||||
|
||||
if (routes.count(0) == 0) {
|
||||
auto defaultRoute = NekoGui::RoutingChain::GetDefaultChain();
|
||||
NekoGui::profileManager->AddRouteChain(defaultRoute);
|
||||
if (routes.empty()) {
|
||||
auto defaultRoute = RoutingChain::GetDefaultChain();
|
||||
profileManager->AddRouteChain(defaultRoute);
|
||||
}
|
||||
|
||||
// Add default route chains
|
||||
|
||||
@ -144,6 +144,13 @@ RouteItem::RouteItem(QWidget *parent, const std::shared_ptr<NekoGui::RoutingChai
|
||||
simpleBlock->setPlainText(chain->GetSimpleRules(NekoGui::block));
|
||||
simpleProxy->setPlainText(chain->GetSimpleRules(NekoGui::proxy));
|
||||
|
||||
if (chain->isViewOnly())
|
||||
{
|
||||
ui->simple_direct_box->setEnabled(false);
|
||||
ui->simple_block_box->setEnabled(false);
|
||||
ui->simple_proxy_box->setEnabled(false);
|
||||
}
|
||||
|
||||
connect(ui->tabWidget->tabBar(), &QTabBar::currentChanged, this, [=]()
|
||||
{
|
||||
if (ui->tabWidget->tabBar()->currentIndex() == 1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user