Оптимизировал CommonView

This commit is contained in:
2025-09-25 11:46:30 +03:00
parent d93e5e49c9
commit 152942018a
12 changed files with 205 additions and 280 deletions

View File

@@ -112,7 +112,7 @@ void EditorInstructors::on_btnDeleteInstructor_clicked()
if(treeItemParent == nullptr)
{//Выбран Инструктор
int id = treeItemCurrent->text(ColumnsTreeInsructors::clmn_ID).toInt();
int id = treeItemCurrent->text(ColumnsTreeUsers::clmn_ID).toInt();
if(connectorToServer->isAdminInstructor(id))
{//Это Админ!
@@ -145,7 +145,7 @@ void EditorInstructors::on_btnToOrFromArchive_clicked()
if(treeItemParent == nullptr)
{//Выбран Инструктор
int id = treeItemCurrent->text(ColumnsTreeInsructors::clmn_ID).toInt();
int id = treeItemCurrent->text(ColumnsTreeUsers::clmn_ID).toInt();
Instructor instructor = connectorToServer->getInstructor(id);
if(instructor.getID() == 0)
@@ -194,7 +194,7 @@ void EditorInstructors::on_btnEdit_clicked()
if(treeItemParent == nullptr)
{//Выбран Инструктор
int id = treeItemCurrent->text(ColumnsTreeInsructors::clmn_ID).toInt();
int id = treeItemCurrent->text(ColumnsTreeUsers::clmn_ID).toInt();
if(connectorToServer->isLoggedInInstructor(id))
{//Инструктор залогирован!
@@ -252,7 +252,7 @@ void EditorInstructors::on_treeWidgetCurrentItemChanged(QTreeWidgetItem *current
if(treeItemParent == nullptr)
{//Выбран инструктор
int id = current->text(ColumnsTreeInsructors::clmn_ID).toInt();
int id = current->text(ColumnsTreeUsers::clmn_ID).toInt();
lastCurrentID = id;