Browse Source

修复评估类型显示错误

chengxr 1 year ago
parent
commit
5653a57b77

+ 0 - 1
QFD/common/ProjectManager.cpp

@@ -55,7 +55,6 @@ QList<ProjectManager::IndexType> ProjectManager::indexListOfEvalTypes(EvalTypes
 ProjectManager::EvalTypes ProjectManager::evalTypes(ProjectInfo proj)
 {
     int t           = proj.estimateType.toInt();
-    t               = 96;
     EvalTypes types = EvalTypes(t);
     return types;
 }

+ 4 - 2
QFD/widgets/CreateProjWidget.cpp

@@ -124,10 +124,12 @@ void CreateProjWidget::setProjectInfo(ProjectInfo *info)
     m_rank->setText(info->positionalTitles);
     m_note->setPlainText(info->remark);
     m_name->setText(info->projectName);
+
     ProjectManager::EvalTypes types = ProjectManager::evalTypes(*info);
+
     m_type1->setChecked((types & ProjectManager::Requirements) == ProjectManager::Requirements);
-    m_type1->setChecked((types & ProjectManager::SchemeOptimization) == ProjectManager::SchemeOptimization);
-    m_type1->setChecked((types & ProjectManager::OverallEfficiency) == ProjectManager::OverallEfficiency);
+    m_type2->setChecked((types & ProjectManager::Requirements) == ProjectManager::SchemeOptimization);
+    m_type3->setChecked((types & ProjectManager::Requirements) == ProjectManager::OverallEfficiency);
 }
 
 void CreateProjWidget::initWindow()

+ 1 - 0
QFD/widgets/ProjectListWidget.cpp

@@ -112,6 +112,7 @@ void ProjectListItemWidget::connectSignalsAndSlots()
 void ProjectListItemWidget::setInfo(ProjectInfo *info)
 {
     m_proj = info;
+
     if (info == nullptr) {
         return;
     }