From c216ed2d1f3d6327d1ff2c5cf2fb5c07783958ab Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 2 Mar 2023 10:41:48 +0000 Subject: [PATCH] Make SME prop-grid hack Mac-only. Fixes https://gitlab.com/kicad/code/kicad/issues/13852 (cherry picked from commit dcba555d444b421346cb4ab84817a652d605aded) --- eeschema/sim/sim_property.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eeschema/sim/sim_property.cpp b/eeschema/sim/sim_property.cpp index b5b227d747..83303055b7 100644 --- a/eeschema/sim/sim_property.cpp +++ b/eeschema/sim/sim_property.cpp @@ -145,11 +145,12 @@ bool SIM_STRING_PROPERTY::OnEvent( wxPropertyGrid* propgrid, wxWindow* wnd_prima } } +#ifdef __WXMAC__ if( wxPropertyGrid* propGrid = dynamic_cast( wnd_primary->GetParent() ) ) { - // This doesn't seem like it should be required, as wxPGTextCtrlEditor::OnTextCtrlEvent() - // should be setting the value to modified. But it doesn't (or the modified flag is - // cleared at some point later), and even if it is set, the changes don't get committed. + // This shouldn't be required, as wxPGTextCtrlEditor::OnTextCtrlEvent() should be setting + // the value to modified. But it doesn't on Mac (or the modified flag is cleared at some + // point later), and even if it is set, the changes don't get committed. // (We used to have code in DIALOG_SIM_MODEL to commit things on *some* actions, but it // wasn't complete and this appears to have at least a better hit rate.) propGrid->CallAfter( @@ -159,6 +160,7 @@ bool SIM_STRING_PROPERTY::OnEvent( wxPropertyGrid* propgrid, wxWindow* wnd_prima propGrid->CommitChangesFromEditor(); } ); } +#endif return false; }