refactor: MainWindow, simplify ip update if core is not running

This commit is contained in:
sithlord48
2025-12-31 08:43:23 -05:00
committed by Chris Rizzitello
parent 00235ba189
commit 1973005e98

View File

@ -1313,10 +1313,9 @@ void MainWindow::updateIpLabel(const QList<QHostAddress> &addresses)
}
} else {
// Server is not running - update normally
const auto suggestedIp = m_networkMonitor->getSuggestedIPv4Address();
QString displayIP = !suggestedIp.isNull() ? suggestedIp.toString() : ipList.first();
m_currentIpAddress = !suggestedIp.isNull() ? suggestedIp : QHostAddress();
m_currentIPValid = !suggestedIp.isNull();
m_currentIpAddress = m_networkMonitor->getSuggestedIPv4Address();
m_currentIPValid = m_currentIpAddress.isNull();
QString displayIP = m_currentIPValid ? m_currentIpAddress.toString() : ipList.first();
labelText.append(displayIP);
}