mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Схлопывание диалогов при выключении Сервера
This commit is contained in:
@@ -11,6 +11,7 @@ DialogSettings::DialogSettings(ConnectorToServer* connectorToServer, bool instru
|
||||
ui(new Ui::DialogSettings),
|
||||
settings(nullptr),
|
||||
connectorToServer(nullptr),
|
||||
dlgVersionControl(nullptr),
|
||||
flSettingsServerChanged(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -76,10 +77,25 @@ DialogSettings::DialogSettings(ConnectorToServer* connectorToServer, bool instru
|
||||
|
||||
DialogSettings::~DialogSettings()
|
||||
{
|
||||
if(dlgVersionControl)
|
||||
dlgVersionControl->close();
|
||||
|
||||
delete ui;
|
||||
delete settings;
|
||||
}
|
||||
|
||||
void DialogSettings::deactivate()
|
||||
{
|
||||
ui->btnSetVersion->setEnabled(false);
|
||||
|
||||
if(dlgVersionControl)
|
||||
{
|
||||
dlgVersionControl->close();
|
||||
delete dlgVersionControl;
|
||||
dlgVersionControl = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
ServerSettings DialogSettings::getSettings()
|
||||
{
|
||||
return *settings;
|
||||
@@ -201,10 +217,15 @@ void DialogSettings::on_btnSetVersion_clicked()
|
||||
if(connectorToServer)
|
||||
if(connectorToServer->getIsConnected())
|
||||
{
|
||||
DialogVersionControl *versionSelectWidget = new DialogVersionControl(connectorToServer, this);
|
||||
versionSelectWidget->initialize(connectorToServer->getLoginName());
|
||||
versionSelectWidget->exec();
|
||||
delete versionSelectWidget;
|
||||
dlgVersionControl = new DialogVersionControl(connectorToServer, this);
|
||||
dlgVersionControl->initialize(connectorToServer->getLoginName());
|
||||
dlgVersionControl->exec();
|
||||
|
||||
if(dlgVersionControl)
|
||||
{
|
||||
delete dlgVersionControl;
|
||||
dlgVersionControl = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user