mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 02:40:20 +08:00
fix: GUARD!
This commit is contained in:
parent
489c227e6b
commit
f73808aece
@ -18,7 +18,6 @@
|
||||
using QtNodes::FlowView;
|
||||
using namespace Qv2ray::ui::nodemodels;
|
||||
|
||||
static bool isLoading = false;
|
||||
#define CurrentRule this->rules[this->currentRuleTag]
|
||||
#define LOADINGCHECK \
|
||||
if (isLoading) \
|
||||
@ -914,8 +913,8 @@ void RouteEditor::on_editBtn_clicked()
|
||||
|
||||
if (isTagChanged)
|
||||
{
|
||||
DEBUG(MODULE_UI, "Outbound tag is changed: " + QString(isTagChanged))
|
||||
auto newTag = getTag(_result);
|
||||
DEBUG(MODULE_UI, "Outbound tag is changed: " + newTag)
|
||||
RenameItemTag(RENAME_OUTBOUND, getTag(_out), &newTag);
|
||||
}
|
||||
|
||||
|
@ -103,6 +103,7 @@ class RouteEditor
|
||||
void onConnectionDeleted(QtNodes::Connection const &c);
|
||||
|
||||
private:
|
||||
bool isLoading = false;
|
||||
void RenameItemTag(ROUTE_EDIT_MODE mode, const QString originalTag, QString *newTag);
|
||||
void ShowCurrentRuleDetail();
|
||||
//
|
||||
|
@ -267,9 +267,12 @@ void RouteEditor::ResolveDefaultOutboundTag(QString original, QString newTag)
|
||||
{
|
||||
LOG(MODULE_UI, "Resolving default outbound settings: default=" + defaultOutbound + " original=" + original + " new=" + newTag)
|
||||
auto isDefaultChanged = original == defaultOutbound;
|
||||
//
|
||||
isLoading = true;
|
||||
defaultOutboundCombo->clear();
|
||||
defaultOutboundCombo->addItems(outbounds.keys());
|
||||
|
||||
isLoading = false;
|
||||
//
|
||||
if (!isDefaultChanged)
|
||||
{
|
||||
LOG(MODULE_UI, "Default outbound is not changed: retaining: " + defaultOutbound)
|
||||
@ -293,7 +296,7 @@ void RouteEditor::ResolveDefaultOutboundTag(QString original, QString newTag)
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(MODULE_UI, "Default outbound is renamed, ")
|
||||
LOG(MODULE_UI, "Default outbound is renamed, new tag is " + newTag)
|
||||
defaultOutboundCombo->setCurrentText(newTag);
|
||||
defaultOutbound = newTag;
|
||||
}
|
||||
|
@ -850,9 +850,8 @@ void MainWindow::OnConnectionCreated(const ConnectionId &id, const QString &disp
|
||||
}
|
||||
void MainWindow::OnConnectionDeleted(const ConnectionId &id, const GroupId &groupId)
|
||||
{
|
||||
auto &child = connectionNodes.value(id);
|
||||
auto child = connectionNodes.take(id);
|
||||
groupNodes.value(groupId)->removeChild(child.get());
|
||||
connectionNodes.remove(id);
|
||||
}
|
||||
void MainWindow::OnConnectionGroupChanged(const ConnectionId &id, const GroupId &originalGroup, const GroupId &newGroup)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user