Allow dialogs to force evaluation of UNIT_BINDER
When setting previous values, we don't get the "OnFocus" event, so the
evaluation would not get triggered by simply repeating (using the
keyboard)
Fixes https://gitlab.com/kicad/code/kicad/issues/10752
(cherry picked from commit 4c81307391
)
This commit is contained in:
parent
42917874dd
commit
57df1b469a
|
@ -186,6 +186,14 @@ public:
|
|||
m_coordType = aCoordType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Force the binder to evaluate the text
|
||||
*/
|
||||
void RequireEval()
|
||||
{
|
||||
m_needsEval = true;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
void onSetFocus( wxFocusEvent& aEvent );
|
||||
|
|
|
@ -77,6 +77,11 @@ DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT( PCB_BASE_FRAME *aParent, VECTOR2I& aTransl
|
|||
m_xEntry->ChangeValue( m_options.entry1 );
|
||||
m_yEntry->ChangeValue( m_options.entry2 );
|
||||
|
||||
// Force the evaluation when setting previous values
|
||||
m_moveX.RequireEval();
|
||||
m_moveY.RequireEval();
|
||||
m_rotate.RequireEval();
|
||||
|
||||
m_rotate.SetUnits( EDA_UNITS::DEGREES );
|
||||
m_rotate.SetValue( m_options.entryRotation );
|
||||
m_anchorOptions->SetSelection( std::min( m_options.entryAnchorSelection, m_menuIDs.size() ) );
|
||||
|
|
Loading…
Reference in New Issue