mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: wxDisplay crash on wxNOT_FOUND
Change-Id: If7b936d361873e20fb71b7fc35c9d270cd39a763
This commit is contained in:
parent
d4ddd8f470
commit
af54a34567
5 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue