Skip to content

Commit

Permalink
DestroyWindow after select by clicking, InvalidateRect instead of Rea…
Browse files Browse the repository at this point in the history
…drawWindow in OnLeftClickedUp
  • Loading branch information
fxliang committed Mar 26, 2024
1 parent 1e9d682 commit cd9953e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions WeaselUI/WeaselPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,12 @@ LRESULT WeaselPanel::OnLeftClickedUp(UINT uMsg,
rect.InflateRect(m_style.hilite_padding_x, m_style.hilite_padding_y);
if (rect.PtInRect(point)) {
size_t i = m_ctx.cinfo.highlighted;
if (_UICallback)
if (_UICallback) {
_UICallback(&i, NULL, NULL, NULL);
DestroyWindow();
}
} else {
RedrawWindow();
InvalidateRect(&rcw, true);
}
}
bHandled = true;
Expand Down

0 comments on commit cd9953e

Please sign in to comment.