PANEL_PREVIEW_3D_MODEL does its own pretty-printing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/23401
This commit is contained in:
Jeff Young
2026-03-17 13:16:06 +00:00
parent db404d9906
commit e4b8fde25b
4 changed files with 132 additions and 123 deletions
+9 -9
View File
@@ -29,16 +29,12 @@
TEXT_CTRL_EVAL::TEXT_CTRL_EVAL( wxWindow* aParent, wxWindowID aId, const wxString& aValue,
const wxPoint& aPos, const wxSize& aSize, long aStyle,
const wxValidator& aValidator, const wxString& aName ) :
wxTextCtrl( aParent, aId, aValue, aPos, aSize, aStyle | wxTE_PROCESS_ENTER, aValidator,
aName ),
wxTextCtrl( aParent, aId, aValue, aPos, aSize, aStyle | wxTE_PROCESS_ENTER, aValidator, aName ),
m_eval( EDA_UNITS::UNSCALED )
{
Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( TEXT_CTRL_EVAL::onTextFocusGet ), nullptr,
this );
Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( TEXT_CTRL_EVAL::onTextFocusLost ), nullptr,
this );
Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( TEXT_CTRL_EVAL::onTextEnter ), nullptr,
this );
Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( TEXT_CTRL_EVAL::onTextFocusGet ), nullptr, this );
Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( TEXT_CTRL_EVAL::onTextFocusLost ), nullptr, this );
Connect( wxEVT_TEXT_ENTER, wxCommandEventHandler( TEXT_CTRL_EVAL::onTextEnter ), nullptr, this );
}
@@ -62,7 +58,11 @@ void TEXT_CTRL_EVAL::onTextFocusGet( wxFocusEvent& aEvent )
void TEXT_CTRL_EVAL::onTextFocusLost( wxFocusEvent& aEvent )
{
evaluate();
if( m_customEval.has_value() )
m_customEval.value()( this );
else
evaluate();
aEvent.Skip();
}