← Back to team overview

kicad-developers team mailing list archive

[PATCH 5/7] Custom grid editors: cancel changes on escape.

 

If user closes grid cell editor with Escape key any changes must be
canceled.
---
 common/widgets/grid_text_button_helpers.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/widgets/grid_text_button_helpers.cpp b/common/widgets/grid_text_button_helpers.cpp
index ae17a3640..d6ff3b2b4 100644
--- a/common/widgets/grid_text_button_helpers.cpp
+++ b/common/widgets/grid_text_button_helpers.cpp
@@ -146,6 +146,7 @@ void GRID_CELL_TEXT_BUTTON::ApplyEdit( int aRow, int aCol, wxGrid* aGrid )
 
 void GRID_CELL_TEXT_BUTTON::Reset()
 {
+    Combo()->SetValue( m_value );
 }
 
 
-- 
2.20.1



References