Skip to content

Commit

Permalink
chore: not find right selection
Browse files Browse the repository at this point in the history
Log:
  • Loading branch information
Decodetalkers committed Oct 26, 2023
1 parent 9358965 commit 17e66e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugin-power/window/generalmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ void GeneralModule::initUI()
}
}
} else {
bool findHighPerform = false;
bool findBalancePerform = false;
for (int i = 0; i < row_count; ++i) {
QStandardItem *items = m_powerPlanModel->item(i, 0);
if (items->data(PowerPlanRole).toString() == PERFORMANCE) {
findHighPerform = true;
if (items->data(PowerPlanRole).toString() == BALANCEPERFORMANCE) {
findBalancePerform = true;
break;
}
}
if (!findHighPerform) {
if (!findBalancePerform) {
DStandardItem *powerPlanItem =
new DStandardItem(m_powerPlanMap.value(BALANCEPERFORMANCE));
powerPlanItem->setData(PERFORMANCE, PowerPlanRole);
Expand Down

0 comments on commit 17e66e2

Please sign in to comment.