mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Forms: Update ConnectInfo on settings apply instead of close
Just for better usability
This commit is contained in:
parent
d811c95e10
commit
a4e62acf25
@ -29,6 +29,12 @@ ConnectInfo::~ConnectInfo()
|
||||
}
|
||||
|
||||
void ConnectInfo::showEvent(QShowEvent *event)
|
||||
{
|
||||
UNUSED_PARAMETER(event);
|
||||
RefreshData();
|
||||
}
|
||||
|
||||
void ConnectInfo::RefreshData()
|
||||
{
|
||||
auto conf = GetConfig();
|
||||
if (!conf) {
|
||||
|
@ -14,6 +14,7 @@ public:
|
||||
explicit ConnectInfo(QWidget* parent = 0);
|
||||
~ConnectInfo();
|
||||
void showEvent(QShowEvent *event);
|
||||
void RefreshData();
|
||||
|
||||
private Q_SLOTS:
|
||||
void CopyServerIpButtonClicked();
|
||||
|
@ -117,8 +117,6 @@ void SettingsDialog::DialogButtonClicked(QAbstractButton *button)
|
||||
|
||||
void SettingsDialog::SaveFormData()
|
||||
{
|
||||
connectInfo->hide();
|
||||
|
||||
auto conf = GetConfig();
|
||||
if (!conf) {
|
||||
blog(LOG_ERROR, "[SettingsDialog::SaveFormData] Unable to retreive config!");
|
||||
@ -163,6 +161,8 @@ void SettingsDialog::SaveFormData()
|
||||
|
||||
conf->Save();
|
||||
|
||||
connectInfo->RefreshData();
|
||||
|
||||
if (needsRestart) {
|
||||
blog(LOG_INFO, "[SettingsDialog::SaveFormData] A setting was changed which requires a server restart.");
|
||||
auto server = GetWebSocketServer();
|
||||
|
Loading…
Reference in New Issue
Block a user