Configurator: hide show unconfigured ports

master
tobtoht 3 years ago
parent bfd4dd21dd
commit 443fb7b734
Signed by: tobtoht
GPG Key ID: 1CADD27F41F45C3C

@ -53,7 +53,8 @@ Configurator::Configurator(QWidget *parent) :
this->setConfig(Config::RPCBindIP, text); this->setConfig(Config::RPCBindIP, text);
}); });
ui->lineRPCBindPort->setText(config()->get(Config::RPCBindPort).toString()); QString rpcPort = config()->get(Config::RPCBindPort).toString();
ui->lineRPCBindPort->setText(rpcPort == "0" ? "" : rpcPort);
connect(ui->lineP2PBindPort, &QLineEdit::textChanged, [this](const QString &text){ connect(ui->lineP2PBindPort, &QLineEdit::textChanged, [this](const QString &text){
this->setConfig(Config::RPCBindPort, text); this->setConfig(Config::RPCBindPort, text);
}); });
@ -63,7 +64,8 @@ Configurator::Configurator(QWidget *parent) :
this->setConfig(Config::P2PBindIP, text); this->setConfig(Config::P2PBindIP, text);
}); });
ui->lineP2PBindPort->setText(config()->get(Config::P2PBindPort).toString()); QString p2pPort = config()->get(Config::P2PBindPort).toString();
ui->lineP2PBindPort->setText(p2pPort == "0" ? "" : p2pPort);
connect(ui->lineP2PBindPort, &QLineEdit::textChanged, [this](const QString &text){ connect(ui->lineP2PBindPort, &QLineEdit::textChanged, [this](const QString &text){
this->setConfig(Config::P2PBindPort, text); this->setConfig(Config::P2PBindPort, text);
}); });

Loading…
Cancel
Save