From a130ed99688a34a1fb3eebae63be9e9938f4bba4 Mon Sep 17 00:00:00 2001 From: Mark Roszko Date: Mon, 9 Dec 2019 00:40:08 -0500 Subject: [PATCH] Fix improper SetValue usage on radio buttons --- eeschema/dialogs/dialog_annotate.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/eeschema/dialogs/dialog_annotate.cpp b/eeschema/dialogs/dialog_annotate.cpp index 13792e985c..a3f8f5140f 100644 --- a/eeschema/dialogs/dialog_annotate.cpp +++ b/eeschema/dialogs/dialog_annotate.cpp @@ -150,8 +150,12 @@ void DIALOG_ANNOTATE::InitValues() switch( option ) { default: - case 0: m_rbSortBy_X_Position->SetValue( 1 ); break; - case 1: m_rbSortBy_Y_Position->SetValue( 1 ); break; + case 0: + m_rbSortBy_X_Position->SetValue( true ); + break; + case 1: + m_rbSortBy_Y_Position->SetValue( true ); + break; } m_Config->Read( KEY_ANNOTATE_ALGO_OPTION, &option, 0L ); @@ -159,9 +163,15 @@ void DIALOG_ANNOTATE::InitValues() switch( option ) { default: - case 0: m_rbFirstFree->SetValue( 1 ); break; - case 1: m_rbSheetX100->SetValue( 100 ); break; - case 2: m_rbSheetX1000->SetValue( 1000 ); break; + case 0: + m_rbFirstFree->SetValue( true ); + break; + case 1: + m_rbSheetX100->SetValue( true ); + break; + case 2: + m_rbSheetX1000->SetValue( true ); + break; } m_textNumberAfter->SetValue( wxT( "0" ) );