From 8fa966aba4dbac6d8dc2e7d8a8185286edb74011 Mon Sep 17 00:00:00 2001 From: arm64v8a <48624112+arm64v8a@users.noreply.github.com> Date: Sun, 22 Jan 2023 17:20:32 +0900 Subject: [PATCH] bug fix --- ui/edit/edit_custom.cpp | 6 +- ui/edit/edit_custom.ui | 178 +++++++++++++++++++++++----------------- ui/mainwindow.cpp | 4 +- 3 files changed, 108 insertions(+), 80 deletions(-) diff --git a/ui/edit/edit_custom.cpp b/ui/edit/edit_custom.cpp index 1fed9c8..fbd1b19 100644 --- a/ui/edit/edit_custom.cpp +++ b/ui/edit/edit_custom.cpp @@ -81,10 +81,8 @@ void EditCustom::onStart(QSharedPointer _ent) { if (preset_core == "internal") { ui->core->hide(); ui->core_l->setText(tr("Outbound JSON, please read the documentation.")); - ui->command->hide(); - ui->command_l->hide(); - ui->config_suffix->hide(); - ui->config_suffix_l->hide(); + ui->w_ext1->hide(); + ui->w_ext2->hide(); } // Preview diff --git a/ui/edit/edit_custom.ui b/ui/edit/edit_custom.ui index 4ed650c..a34d6c4 100644 --- a/ui/edit/edit_custom.ui +++ b/ui/edit/edit_custom.ui @@ -46,88 +46,116 @@ - - - - - Command - - - - - - - %config% - - - - - - - Config Suffix - - - - - - - true - - + + + + 0 + + + 0 + + + 0 + + + 0 + + + - + Command - - + + + + + + %config% + + + + + - json + Config Suffix - - - - yml + + + + + + true - - - - + + + + + + + + json + + + + + yml + + + + + + - - - - - Random if it's empty or zero. - - - Mapping Port - - - - - - - - - - Random if it's empty or zero. - - - Socks Port - - - - - - - - - - Preview - - - - + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Random if it's empty or zero. + + + Mapping Port + + + + + + + + + + Random if it's empty or zero. + + + Socks Port + + + + + + + + + + Preview + + + + + diff --git a/ui/mainwindow.cpp b/ui/mainwindow.cpp index 0897d36..2e79b0a 100644 --- a/ui/mainwindow.cpp +++ b/ui/mainwindow.cpp @@ -1340,7 +1340,9 @@ void MainWindow::show_log_impl(const QString &log) { } } -#define ADD_TO_CURRENT_ROUTE(a, b) NekoRay::dataStore->routing->a = (SplitLines(NekoRay::dataStore->routing->a) << (b)).join("\n"); +#define ADD_TO_CURRENT_ROUTE(a, b) \ + NekoRay::dataStore->routing->a = (SplitLines(NekoRay::dataStore->routing->a) << (b)).join("\n"); \ + NekoRay::dataStore->routing->Save(); void MainWindow::on_masterLogBrowser_customContextMenuRequested(const QPoint &pos) { QMenu *menu = ui->masterLogBrowser->createStandardContextMenu();