Browse Source

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)
7.0
Seth Hillbrand 4 years ago
parent
commit
57df1b469a
  1. 8
      include/widgets/unit_binder.h
  2. 5
      pcbnew/dialogs/dialog_move_exact.cpp

8
include/widgets/unit_binder.h

@ -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 );

5
pcbnew/dialogs/dialog_move_exact.cpp

@ -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…
Cancel
Save