|
@@ -200,6 +200,9 @@ void ConfigExpertDataWidget::loadNodeData()
|
|
|
|
|
|
void ConfigExpertDataWidget::selectFirstImported()
|
|
|
{
|
|
|
+ if (m_configList.size() <= 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
int index = 0;
|
|
|
for (int i = 0; i < m_configList.count(); i++) {
|
|
|
UserConfig *config = m_configList[i];
|
|
@@ -337,8 +340,15 @@ void ConfigExpertDataWidget::slotAddUser(QFUser *user)
|
|
|
void ConfigExpertDataWidget::slotRemoveConfig(UserConfig *config)
|
|
|
{
|
|
|
qDebug() << __FUNCTION__ << __LINE__ << config->userName << endl;
|
|
|
- UserConfigService().DeleteUserConfigById(config->id);
|
|
|
- loadData();
|
|
|
+ bool ret = UserConfigService().DeleteUserConfigById(config->id);
|
|
|
+ if (ret) {
|
|
|
+ ret = NodeMatrixService().deleteExpertData(config->engineerId, config->userId);
|
|
|
+
|
|
|
+ if (ret) {
|
|
|
+ loadData();
|
|
|
+ selectFirstImported();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void ConfigExpertDataWidget::slotImportData(UserConfig *config)
|