mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
Выбор Обучаемых/Инструкторов исправил
This commit is contained in:
@@ -44,6 +44,7 @@ public:
|
||||
void clearSelection()
|
||||
{
|
||||
treeWidget->clearSelection();
|
||||
lastCurrentID = 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
TraineesView::TraineesView(ConnectorToServer* connectorToServer, TypeView type, QWidget *parent):
|
||||
CommonView(connectorToServer, type, parent)
|
||||
{
|
||||
typeObject = TypeObject::objGroup;
|
||||
typeObject = TypeObject::objTrainee;
|
||||
}
|
||||
|
||||
void TraineesView::resizeEvent(QResizeEvent *event)
|
||||
|
||||
@@ -151,8 +151,10 @@ void ViewerTrainees::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column
|
||||
if(item == nullptr)
|
||||
return;
|
||||
|
||||
//if(current->childCount() == 0)
|
||||
if(item->childCount() == 0)
|
||||
{//Выбран обучаемый
|
||||
typeObject = TypeObject::objTrainee;
|
||||
|
||||
QString login = item->text(ColumnsTreeTrainees::clmn_Login);
|
||||
//if(login != "")
|
||||
{
|
||||
@@ -166,6 +168,18 @@ void ViewerTrainees::on_treeWidget_itemClicked(QTreeWidgetItem *item, int column
|
||||
Q_EMIT signal_traineeSelected(login);
|
||||
}
|
||||
}
|
||||
else
|
||||
{//Выбрана группа
|
||||
typeObject = TypeObject::objGroup;
|
||||
|
||||
int id_group = item->text(ColumnsTreeTrainees::clmn_ID).toInt();
|
||||
|
||||
lastCurrentID = id_group;
|
||||
typeObject = TypeObject::objGroup;
|
||||
|
||||
QString login = "";
|
||||
Q_EMIT signal_traineeSelected(login);
|
||||
}
|
||||
}
|
||||
|
||||
void ViewerTrainees::updateButtons()
|
||||
|
||||
Reference in New Issue
Block a user