mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: wxDisplay crash on wxNOT_FOUND
Change-Id: If7b936d361873e20fb71b7fc35c9d270cd39a763
This commit is contained in:
@@ -141,7 +141,7 @@ bool MarkdownTip::ShowTip(wxPoint pos, std::string const &tip, std::string const
|
||||
this->Hide();
|
||||
}
|
||||
if (_tipView->GetParent() == this) {
|
||||
wxSize size = wxDisplay(wxDisplay::GetFromWindow(this)).GetClientArea().GetSize();
|
||||
wxSize size = wxDisplay(this).GetClientArea().GetSize();
|
||||
_requestPos = pos;
|
||||
if (pos.y + this->GetSize().y > size.y)
|
||||
pos.y = size.y - this->GetSize().y;
|
||||
@@ -254,7 +254,7 @@ void MarkdownTip::OnTitleChanged(wxWebViewEvent& event)
|
||||
return;
|
||||
_lastHeight = height;
|
||||
height *= 1.25; height += 50;
|
||||
wxSize size = wxDisplay(wxDisplay::GetFromWindow(this)).GetClientArea().GetSize();
|
||||
wxSize size = wxDisplay(this).GetClientArea().GetSize();
|
||||
if (height > size.y)
|
||||
height = size.y;
|
||||
wxPoint pos = _requestPos;
|
||||
|
||||
Reference in New Issue
Block a user