diff --git a/CodeFormatter/codeformatter.cpp b/CodeFormatter/codeformatter.cpp index 289b7383d8..e6df599613 100644 --- a/CodeFormatter/codeformatter.cpp +++ b/CodeFormatter/codeformatter.cpp @@ -542,7 +542,7 @@ void CodeFormatter::OnFormatCompleted(clSourceFormatEvent& event) auto editor = clGetManager()->FindEditor(filepath); if (editor) { - wxWindowUpdateLocker window_locker{ editor->GetCtrl() }; + wxWindowUpdateLocker window_locker{ editor->GetCtrl()->GetParent() }; editor->GetCtrl()->BeginUndoAction(); clEditorStateLocker locker{ editor->GetCtrl() }; editor->GetCtrl()->SetText(event.GetFormattedString()); diff --git a/LiteEditor/cl_editor.cpp b/LiteEditor/cl_editor.cpp index abe19562d6..56c4d274af 100644 --- a/LiteEditor/cl_editor.cpp +++ b/LiteEditor/cl_editor.cpp @@ -6115,7 +6115,7 @@ void clEditor::OpenURL(wxCommandEvent& event) void clEditor::ReloadFromDisk(bool keepUndoHistory) { - wxWindowUpdateLocker locker(this); + wxWindowUpdateLocker locker(GetParent()); SetReloadingFile(true); DoCancelCalltip();