diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index b2578a4bd8..8e3820d162 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -5446,6 +5446,13 @@ void wxStyledTextCtrl::OnDPIChanged(wxDPIChangedEvent& evt) { { SetMarginWidth(i, (int)wxMulDivInt32(GetMarginWidth(i), evt.GetNewDPI().y, evt.GetOldDPI().y)); } + + // Hide auto-complete popup, there is no (easy) way to set it to the correct size + // and position + if ( AutoCompActive() ) + { + AutoCompCancel(); + } } diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 35210cbf1b..a3987c47fe 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -973,6 +973,13 @@ void wxStyledTextCtrl::OnDPIChanged(wxDPIChangedEvent& evt) { { SetMarginWidth(i, (int)wxMulDivInt32(GetMarginWidth(i), evt.GetNewDPI().y, evt.GetOldDPI().y)); } + + // Hide auto-complete popup, there is no (easy) way to set it to the correct size + // and position + if ( AutoCompActive() ) + { + AutoCompCancel(); + } }