Схлопывание диалогов при выключении Сервера

This commit is contained in:
2025-11-27 10:43:12 +03:00
parent f75ff9660f
commit 3e50bfe2e2
7 changed files with 72 additions and 14 deletions

View File

@@ -13,6 +13,7 @@ DialogVersionControl::DialogVersionControl(ConnectorToServer* connectorToServer,
selectedVersion(nullptr),
versionContainer(nullptr),
waitAnimationWidget(nullptr),
dlgNewVersion(nullptr),
authorName(""),
flGetVersion(false)
{
@@ -32,6 +33,13 @@ DialogVersionControl::DialogVersionControl(ConnectorToServer* connectorToServer,
DialogVersionControl::~DialogVersionControl()
{
if(dlgNewVersion)
{
dlgNewVersion->close();
delete dlgNewVersion;
dlgNewVersion = nullptr;
}
waitAnimationWidget->hideWithStop();
delete versionContainer;
@@ -123,7 +131,7 @@ void DialogVersionControl::on_createDuplicateButton_clicked()
return;
}
DialogNewVersion *dlgNewVersion = new DialogNewVersion(this);
dlgNewVersion = new DialogNewVersion(this);
dlgNewVersion->initialize(selectedVersion->getViewName());
switch(dlgNewVersion->exec())
@@ -140,7 +148,11 @@ void DialogVersionControl::on_createDuplicateButton_clicked()
break;
}
delete dlgNewVersion;
if(dlgNewVersion)
{
delete dlgNewVersion;
dlgNewVersion = nullptr;
}
}
void DialogVersionControl::on_deleteVersionButton_clicked()