From 4612175da2f9c7fffb231766d39827a0cd251a6a Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 4 Mar 2019 15:30:32 -0500 Subject: [PATCH] Pcbnew: better fix for dialog default button handler issues. Use DIALOG_SHIM::SetInitialFocus() to fix default button handler issue on all platforms. Commit cabc33b4 only fixed the problem on windows. --- pcbnew/dialogs/dialog_copper_zones.cpp | 2 +- pcbnew/dialogs/dialog_keepout_area_properties.cpp | 2 +- pcbnew/dialogs/dialog_non_copper_zones_properties.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index c7c29269b1..11a68626c1 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -175,7 +175,7 @@ bool DIALOG_COPPER_ZONE::TransferDataToWindow() // Build list of nets: buildAvailableListOfNets(); - m_ListNetNameSelection->SetFocus(); + SetInitialFocus( m_ListNetNameSelection ); return true; } diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp index 3a99d1d75f..a054b91023 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -93,7 +93,7 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataToWindow() case ZONE_CONTAINER::DIAGONAL_FULL: m_OutlineAppearanceCtrl->SetSelection( 2 ); break; } - m_OutlineAppearanceCtrl->SetFocus(); + SetInitialFocus( m_OutlineAppearanceCtrl ); return true; } diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp index 8920b9d50f..5303962cc2 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp @@ -92,7 +92,7 @@ bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow() case ZONE_CONTAINER::DIAGONAL_FULL: m_OutlineAppearanceCtrl->SetSelection( 2 ); break; } - m_OutlineAppearanceCtrl->SetFocus(); + SetInitialFocus( m_OutlineAppearanceCtrl ); return true; }