Pcbnew: fix dialog default button handler issues.
Set the focus to some control in the copper zone, non-copper zone, and keep out zone dialogs required for the default button action to work properly. This only seem to affect windows dialogs. Fixes lp:1818397 https://bugs.launchpad.net/kicad/+bug/1818397
This commit is contained in:
parent
a7f3462637
commit
cabc33b4cd
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -52,8 +52,8 @@ private:
|
|||
|
||||
bool m_NetSortingByPadCount;
|
||||
long m_NetFiltering;
|
||||
static wxString m_netNameShowFilter; // the filter to show nets (default * "*").
|
||||
// static to keep this pattern for an entire Pcbnew session
|
||||
static wxString m_netNameShowFilter; // the filter to show nets (default * "*"). Static
|
||||
// to keep this pattern for an entire Pcbnew session
|
||||
int m_cornerSmoothingType;
|
||||
|
||||
UNIT_BINDER m_cornerRadius;
|
||||
|
@ -66,8 +66,8 @@ private:
|
|||
bool TransferDataFromWindow() override;
|
||||
|
||||
/**
|
||||
* Function AcceptOptions
|
||||
* @param aUseExportableSetupOnly is true to use exportable parameters only (used to export this setup to other zones).
|
||||
* @param aUseExportableSetupOnly is true to use exportable parameters only (used to
|
||||
* export this setup to other zones).
|
||||
* @return bool - false if incorrect options, true if ok.
|
||||
*/
|
||||
bool AcceptOptions( bool aUseExportableSetupOnly = false );
|
||||
|
@ -175,6 +175,8 @@ bool DIALOG_COPPER_ZONE::TransferDataToWindow()
|
|||
// Build list of nets:
|
||||
buildAvailableListOfNets();
|
||||
|
||||
m_ListNetNameSelection->SetFocus();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -217,6 +219,7 @@ bool DIALOG_COPPER_ZONE::TransferDataFromWindow()
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_COPPER_ZONE::OnClose( wxCloseEvent& event )
|
||||
{
|
||||
EndModal( m_settingsExported ? ZONE_EXPORT_VALUES : wxID_CANCEL );
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -93,6 +93,8 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataToWindow()
|
|||
case ZONE_CONTAINER::DIAGONAL_FULL: m_OutlineAppearanceCtrl->SetSelection( 2 ); break;
|
||||
}
|
||||
|
||||
m_OutlineAppearanceCtrl->SetFocus();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*
|
||||
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -92,6 +92,8 @@ bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataToWindow()
|
|||
case ZONE_CONTAINER::DIAGONAL_FULL: m_OutlineAppearanceCtrl->SetSelection( 2 ); break;
|
||||
}
|
||||
|
||||
m_OutlineAppearanceCtrl->SetFocus();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue