mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
bugFixing 4
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
ViewerInstructors::ViewerInstructors(ConnectorToServer* connectorToServer, QWidget *parent) :
|
||||
InstructorsView(connectorToServer, CommonView::TypeView::onlyView, parent),
|
||||
dlgEditor(nullptr),
|
||||
ui(new Ui::ViewerInstructors)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -23,6 +24,8 @@ ViewerInstructors::ViewerInstructors(ConnectorToServer* connectorToServer, QWidg
|
||||
|
||||
ViewerInstructors::~ViewerInstructors()
|
||||
{
|
||||
if(dlgEditor)
|
||||
dlgEditor->close();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -34,6 +37,9 @@ void ViewerInstructors::setAuthComplited(bool authComplited)
|
||||
|
||||
void ViewerInstructors::deactivate()
|
||||
{
|
||||
if(dlgEditor)
|
||||
dlgEditor->close();
|
||||
|
||||
CommonView::deactivate();
|
||||
updateButtons();
|
||||
}
|
||||
@@ -55,18 +61,22 @@ void ViewerInstructors::on_btnEditorInstructors_clicked()
|
||||
{
|
||||
Q_EMIT signal_BlockAutorization(true);
|
||||
|
||||
EditorInstructors editorInstructors(connectorToServer, adminMode);
|
||||
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, &editorInstructors, &EditorInstructors::slot_NeedUpdateUI);
|
||||
EditorInstructors* editorInstructors = new EditorInstructors(connectorToServer, adminMode);
|
||||
connect(connectorToServer, &ConnectorToServer::signal_UpdateDB, editorInstructors, &EditorInstructors::slot_NeedUpdateUI);
|
||||
|
||||
QDialog* dialog = new QDialog(this);
|
||||
QHBoxLayout *layout = new QHBoxLayout(dialog);
|
||||
layout->addWidget(&editorInstructors);
|
||||
dialog->setWindowTitle(tr("Editor of instructors"));
|
||||
dialog->setMinimumSize(1600, 800);
|
||||
dialog->setWindowFlags(dialog->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
dialog->exec();
|
||||
dlgEditor = new QDialog(this);
|
||||
QHBoxLayout *layout = new QHBoxLayout(dlgEditor);
|
||||
layout->addWidget(editorInstructors);
|
||||
dlgEditor->setWindowTitle(tr("Editor of instructors"));
|
||||
dlgEditor->setMinimumSize(1600, 800);
|
||||
dlgEditor->setWindowFlags(dlgEditor->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
dlgEditor->exec();
|
||||
|
||||
loadInstructorsFromDB();
|
||||
delete dlgEditor;
|
||||
dlgEditor = nullptr;
|
||||
|
||||
if(authComplited)
|
||||
loadInstructorsFromDB();
|
||||
|
||||
Q_EMIT signal_BlockAutorization(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user