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)
|
void ConnectInfo::showEvent(QShowEvent *event)
|
||||||
|
{
|
||||||
|
UNUSED_PARAMETER(event);
|
||||||
|
RefreshData();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectInfo::RefreshData()
|
||||||
{
|
{
|
||||||
auto conf = GetConfig();
|
auto conf = GetConfig();
|
||||||
if (!conf) {
|
if (!conf) {
|
||||||
|
@ -14,6 +14,7 @@ public:
|
|||||||
explicit ConnectInfo(QWidget* parent = 0);
|
explicit ConnectInfo(QWidget* parent = 0);
|
||||||
~ConnectInfo();
|
~ConnectInfo();
|
||||||
void showEvent(QShowEvent *event);
|
void showEvent(QShowEvent *event);
|
||||||
|
void RefreshData();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void CopyServerIpButtonClicked();
|
void CopyServerIpButtonClicked();
|
||||||
|
@ -117,8 +117,6 @@ void SettingsDialog::DialogButtonClicked(QAbstractButton *button)
|
|||||||
|
|
||||||
void SettingsDialog::SaveFormData()
|
void SettingsDialog::SaveFormData()
|
||||||
{
|
{
|
||||||
connectInfo->hide();
|
|
||||||
|
|
||||||
auto conf = GetConfig();
|
auto conf = GetConfig();
|
||||||
if (!conf) {
|
if (!conf) {
|
||||||
blog(LOG_ERROR, "[SettingsDialog::SaveFormData] Unable to retreive config!");
|
blog(LOG_ERROR, "[SettingsDialog::SaveFormData] Unable to retreive config!");
|
||||||
@ -163,6 +161,8 @@ void SettingsDialog::SaveFormData()
|
|||||||
|
|
||||||
conf->Save();
|
conf->Save();
|
||||||
|
|
||||||
|
connectInfo->RefreshData();
|
||||||
|
|
||||||
if (needsRestart) {
|
if (needsRestart) {
|
||||||
blog(LOG_INFO, "[SettingsDialog::SaveFormData] A setting was changed which requires a server restart.");
|
blog(LOG_INFO, "[SettingsDialog::SaveFormData] A setting was changed which requires a server restart.");
|
||||||
auto server = GetWebSocketServer();
|
auto server = GetWebSocketServer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user