FIX:fixed move wrong pos when amsmapping window popup first time

Change-Id: I5a9830141ef897399097dc21e70bfddd5113bcff
This commit is contained in:
tao wang 2023-04-07 17:43:37 +08:00 committed by Lane.Wei
parent 5468573e27
commit 9c402384ac
3 changed files with 13 additions and 2 deletions

View file

@ -273,6 +273,14 @@ void MaterialItem::doRender(wxDC &dc)
SetSizer(m_sizer_main);
Layout();
Fit();
Bind(wxEVT_SHOW, [this](wxShowEvent& e) {
if (e.IsShown() && m_parent_item) {
wxPoint pos = m_parent_item->ClientToScreen(wxPoint(0, 0));
pos.y += m_parent_item->GetRect().height;
this->Move(pos);
}
});
}
wxString AmsMapingPopup::format_text(wxString &m_msg)