リビジョン | 29516 (tree) |
---|---|
日時 | 2022-12-25 23:12:24 |
作者 | ![]() |
Make error overlay more consistent:
- In MarkAlAsRead and MonitorShowProject, also look at lastErrorMessage in determining if there should be an exclamation mark
- In ClearErrors, hardcode overlay 0 as we just set pItem->authFailed to false above
@@ -8597,7 +8597,7 @@ | ||
8597 | 8597 | pItem->unreadItems = 0; |
8598 | 8598 | pItem->unreadFirst = 0; |
8599 | 8599 | m_projTree.SetItemState(hLocalItem, pItem->unreadItems ? TVIS_BOLD : 0, TVIS_BOLD); |
8600 | - m_projTree.SetItemState(hLocalItem, pItem->authFailed ? INDEXTOOVERLAYMASK(OVERLAY_MODIFIED) : 0, TVIS_OVERLAYMASK); | |
8600 | + m_projTree.SetItemState(hLocalItem, (pItem->authFailed || !pItem->lastErrorMsg.IsEmpty()) ? INDEXTOOVERLAYMASK(OVERLAY_MODIFIED) : 0, TVIS_OVERLAYMASK); | |
8601 | 8601 | return false; |
8602 | 8602 | }); |
8603 | 8603 |
@@ -8618,7 +8618,7 @@ | ||
8618 | 8618 | MonitorItem* pItem = reinterpret_cast<MonitorItem*>(m_projTree.GetItemData(hItem)); |
8619 | 8619 | pItem->authFailed = false; |
8620 | 8620 | pItem->lastErrorMsg.Empty(); |
8621 | - m_projTree.SetItemState(hItem, pItem->authFailed ? INDEXTOOVERLAYMASK(OVERLAY_MODIFIED) : 0, TVIS_OVERLAYMASK); | |
8621 | + m_projTree.SetItemState(hItem, 0, TVIS_OVERLAYMASK); | |
8622 | 8622 | return false; |
8623 | 8623 | }); |
8624 | 8624 |
@@ -9809,7 +9809,7 @@ | ||
9809 | 9809 | new async::CAsyncCall(this, &CLogDlg::LogThread, &netScheduler); |
9810 | 9810 | |
9811 | 9811 | m_projTree.SetItemState(hItem, pItem->unreadItems ? TVIS_BOLD : 0, TVIS_BOLD); |
9812 | - m_projTree.SetItemState(hItem, pItem->authFailed ? INDEXTOOVERLAYMASK(OVERLAY_MODIFIED) : 0, TVIS_OVERLAYMASK); | |
9812 | + m_projTree.SetItemState(hItem, (pItem->authFailed || !pItem->lastErrorMsg.IsEmpty()) ? INDEXTOOVERLAYMASK(OVERLAY_MODIFIED) : 0, TVIS_OVERLAYMASK); | |
9813 | 9813 | } |
9814 | 9814 | |
9815 | 9815 | bool hasUnreadItems = false; |