FIX:fix click failure on Mac

jira: STUDIO-10962
Change-Id: I051cccbc8633e737a305784fadb69bc76f823065
This commit is contained in:
zhou.xu 2025-03-19 15:03:39 +08:00 committed by lane.wei
parent 29b2b02104
commit c90948dc73
1 changed files with 10 additions and 0 deletions

View File

@ -784,6 +784,16 @@ bool AmsMapingPopup::is_match_material(std::string material)
void AmsMapingPopup::on_left_down(wxMouseEvent &evt)
{
auto pos = ClientToScreen(evt.GetPosition());
{//deal m_reset_btn
auto& item = m_reset_btn;
auto p_rect = item->ClientToScreen(wxPoint(0, 0));
auto left = item->GetSize();
if (pos.x > p_rect.x && pos.y > p_rect.y && pos.x < (p_rect.x + item->GetSize().x) && pos.y < (p_rect.y + item->GetSize().y)) {
reset_ams_info();
evt.StopPropagation();
return;
}
}
for (MappingItem *item : m_mapping_item_list) {
auto p_rect = item->ClientToScreen(wxPoint(0, 0));
auto left = item->GetSize();