FIX:fix click failure on Mac
jira: STUDIO-10962 Change-Id: I051cccbc8633e737a305784fadb69bc76f823065
This commit is contained in:
parent
29b2b02104
commit
c90948dc73
|
@ -784,6 +784,16 @@ bool AmsMapingPopup::is_match_material(std::string material)
|
||||||
void AmsMapingPopup::on_left_down(wxMouseEvent &evt)
|
void AmsMapingPopup::on_left_down(wxMouseEvent &evt)
|
||||||
{
|
{
|
||||||
auto pos = ClientToScreen(evt.GetPosition());
|
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) {
|
for (MappingItem *item : m_mapping_item_list) {
|
||||||
auto p_rect = item->ClientToScreen(wxPoint(0, 0));
|
auto p_rect = item->ClientToScreen(wxPoint(0, 0));
|
||||||
auto left = item->GetSize();
|
auto left = item->GetSize();
|
||||||
|
|
Loading…
Reference in New Issue