diff --git a/eeschema/dialogs/dialog_edit_component_in_lib.cpp b/eeschema/dialogs/dialog_edit_component_in_lib.cpp index d24d967d8a..edf177b75c 100644 --- a/eeschema/dialogs/dialog_edit_component_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_lib.cpp @@ -49,8 +49,11 @@ DIALOG_EDIT_COMPONENT_IN_LIBRARY::DIALOG_EDIT_COMPONENT_IN_LIBRARY( LIB_EDIT_FRA initDlg(); - GetSizer()->SetSizeHints( this ); - Center(); + + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index de9d50af2f..6e8d604b09 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -201,11 +201,12 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow m_staticTextUnitPosY->SetLabel( GetAbbreviatedUnitsLabel( g_UserUnit ) ); wxToolTip::Enable( true ); - - GetSizer()->SetSizeHints( this ); - Center(); - stdDialogButtonSizerOK->SetDefault(); + + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp index 90668941ef..9c653fd1b4 100644 --- a/eeschema/dialogs/dialog_edit_label.cpp +++ b/eeschema/dialogs/dialog_edit_label.cpp @@ -110,12 +110,10 @@ DIALOG_LABEL_EDITOR::DIALOG_LABEL_EDITOR( SCH_EDIT_FRAME* aParent, SCH_TEXT* aTe m_CurrentText = aTextItem; InitDialog(); - GetSizer()->SetSizeHints( this ); - Layout(); - Fit(); - SetMinSize( GetBestSize() ); + FixOSXCancelButtonIssue(); - Centre(); + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index dfe5c5706a..50e413e51b 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -171,9 +171,6 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB( m_parent = aParent; m_libEntry = aLibEntry; m_skipCopyFromPanel = false; - - GetSizer()->SetSizeHints( this ); - Centre(); } @@ -198,6 +195,11 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnInitDialog( wxInitDialogEvent& event copySelectedFieldToPanel(); stdDialogButtonSizerOK->SetDefault(); + + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_edit_one_field.cpp b/eeschema/dialogs/dialog_edit_one_field.cpp index f8fcd1041d..4341b16b30 100644 --- a/eeschema/dialogs/dialog_edit_one_field.cpp +++ b/eeschema/dialogs/dialog_edit_one_field.cpp @@ -138,8 +138,11 @@ void DIALOG_EDIT_ONE_FIELD::init() } m_sdbSizerButtonsOK->SetDefault(); - GetSizer()->SetSizeHints( this ); - Centre(); + + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 83eaf6dc85..256a4b0f00 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -77,8 +77,10 @@ DIALOG_ERC::DIALOG_ERC( SCH_EDIT_FRAME* parent ) : m_lastMarkerFound = NULL; Init(); - GetSizer()->SetSizeHints( this ); - Centre(); + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_erc.h b/eeschema/dialogs/dialog_erc.h index 9cce8b1a1e..27192773aa 100644 --- a/eeschema/dialogs/dialog_erc.h +++ b/eeschema/dialogs/dialog_erc.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2014 KiCad Developers, see CHANGELOG.TXT for contributors. + * Copyright (C) 1992-2014 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 diff --git a/eeschema/dialogs/dialog_erc_base.cpp b/eeschema/dialogs/dialog_erc_base.cpp index 341a1d4019..e9f0f03d19 100644 --- a/eeschema/dialogs/dialog_erc_base.cpp +++ b/eeschema/dialogs/dialog_erc_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 28 2015) +// C++ code generated with wxFormBuilder (version May 21 2016) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -91,14 +91,14 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin wxBoxSizer* bbuttonsSizer; bbuttonsSizer = new wxBoxSizer( wxHORIZONTAL ); - m_buttondelmarkers = new wxButton( m_PanelERC, ID_ERASE_DRC_MARKERS, _("&Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttondelmarkers = new wxButton( m_PanelERC, ID_ERASE_DRC_MARKERS, _("Delete Markers"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttondelmarkers, 0, wxALL|wxEXPAND, 5 ); - m_buttonERC = new wxButton( m_PanelERC, ID_ERC_CMP, _("&Run"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonERC = new wxButton( m_PanelERC, ID_ERC_CMP, _("Run"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonERC->SetDefault(); bbuttonsSizer->Add( m_buttonERC, 0, wxALL|wxEXPAND, 5 ); - m_buttonClose = new wxButton( m_PanelERC, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonClose = new wxButton( m_PanelERC, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); diff --git a/eeschema/dialogs/dialog_erc_base.fbp b/eeschema/dialogs/dialog_erc_base.fbp index 06d1db56a7..72d4c4bafa 100644 --- a/eeschema/dialogs/dialog_erc_base.fbp +++ b/eeschema/dialogs/dialog_erc_base.fbp @@ -277,6 +277,7 @@ sdiagSizer wxVERTICAL + 1 none @@ -409,7 +410,7 @@ 0 - + 0 0 @@ -583,7 +584,7 @@ 0 - + 0 0 @@ -757,7 +758,7 @@ 0 - + 0 0 @@ -1113,7 +1114,7 @@ 0 - + 0 0 -1,-1 @@ -1382,7 +1383,7 @@ 0 0 ID_ERASE_DRC_MARKERS - &Delete Markers + Delete Markers 0 @@ -1470,7 +1471,7 @@ 0 0 ID_ERC_CMP - &Run + Run 0 @@ -1558,7 +1559,7 @@ 0 0 wxID_CANCEL - &Close + Close 0 diff --git a/eeschema/dialogs/dialog_erc_base.h b/eeschema/dialogs/dialog_erc_base.h index b4ce2c6fee..62a62ffbf3 100644 --- a/eeschema/dialogs/dialog_erc_base.h +++ b/eeschema/dialogs/dialog_erc_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 28 2015) +// C++ code generated with wxFormBuilder (version May 21 2016) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/eeschema/dialogs/dialog_lib_edit_draw_item.cpp b/eeschema/dialogs/dialog_lib_edit_draw_item.cpp index 2854421e2d..d0bf3ef0c9 100644 --- a/eeschema/dialogs/dialog_lib_edit_draw_item.cpp +++ b/eeschema/dialogs/dialog_lib_edit_draw_item.cpp @@ -37,6 +37,11 @@ DIALOG_LIB_EDIT_DRAW_ITEM::DIALOG_LIB_EDIT_DRAW_ITEM( wxWindow* parent, // Required under wxGTK if we want to dismiss the dialog with the ESC key SetFocus(); m_sdbSizer1OK->SetDefault(); + + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_lib_edit_draw_item.fbp b/eeschema/dialogs/dialog_lib_edit_draw_item.fbp index e92494e20b..b7854d6f54 100644 --- a/eeschema/dialogs/dialog_lib_edit_draw_item.fbp +++ b/eeschema/dialogs/dialog_lib_edit_draw_item.fbp @@ -46,7 +46,7 @@ wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + DIALOG_SHIM; dialog_shim.h Drawing Properties diff --git a/eeschema/dialogs/dialog_lib_edit_draw_item_base.cpp b/eeschema/dialogs/dialog_lib_edit_draw_item_base.cpp index 7387d6804c..021d584e26 100644 --- a/eeschema/dialogs/dialog_lib_edit_draw_item_base.cpp +++ b/eeschema/dialogs/dialog_lib_edit_draw_item_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version May 6 2016) +// C++ code generated with wxFormBuilder (version May 21 2016) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////// -DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_LIB_EDIT_DRAW_ITEM_BASE::DIALOG_LIB_EDIT_DRAW_ITEM_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); diff --git a/eeschema/dialogs/dialog_lib_edit_draw_item_base.h b/eeschema/dialogs/dialog_lib_edit_draw_item_base.h index f6a407d7e6..553e7d9513 100644 --- a/eeschema/dialogs/dialog_lib_edit_draw_item_base.h +++ b/eeschema/dialogs/dialog_lib_edit_draw_item_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version May 6 2016) +// C++ code generated with wxFormBuilder (version May 21 2016) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,9 @@ #include #include #include +class DIALOG_SHIM; + +#include "dialog_shim.h" #include #include #include @@ -29,7 +32,7 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_LIB_EDIT_DRAW_ITEM_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public wxDialog +class DIALOG_LIB_EDIT_DRAW_ITEM_BASE : public DIALOG_SHIM { private: diff --git a/eeschema/dialogs/dialog_lib_edit_pin.cpp b/eeschema/dialogs/dialog_lib_edit_pin.cpp index 8cf8f408ae..11c6898cdb 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin.cpp @@ -50,8 +50,6 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( EDA_DRAW_FRAME* parent, LIB_PIN* aPin m_textPadName->MoveAfterInTabOrder(m_textPinName); m_sdbSizerButtonsOK->SetDefault(); - GetSizer()->SetSizeHints( this ); - // On some windows manager (Unity, XFCE), this dialog is // not always raised, depending on this dialog is run. // Force it to be raised @@ -67,6 +65,11 @@ DIALOG_LIB_EDIT_PIN::~DIALOG_LIB_EDIT_PIN() void DIALOG_LIB_EDIT_PIN::OnInitDialog( wxInitDialogEvent& event ) { m_textPinName->SetFocus(); + + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } /* diff --git a/eeschema/dialogs/dialog_libedit_options_base.cpp b/eeschema/dialogs/dialog_libedit_options_base.cpp index e7a35a021e..e4855e88d6 100644 --- a/eeschema/dialogs/dialog_libedit_options_base.cpp +++ b/eeschema/dialogs/dialog_libedit_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version May 10 2016) +// C++ code generated with wxFormBuilder (version May 6 2016) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/eeschema/dialogs/dialog_libedit_options_base.fbp b/eeschema/dialogs/dialog_libedit_options_base.fbp index 537f485db8..edd5061a6e 100644 --- a/eeschema/dialogs/dialog_libedit_options_base.fbp +++ b/eeschema/dialogs/dialog_libedit_options_base.fbp @@ -44,7 +44,7 @@ DIALOG_LIBEDIT_OPTIONS_BASE - 499,528 + 499,368 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Library Editor Options diff --git a/eeschema/dialogs/dialog_libedit_options_base.h b/eeschema/dialogs/dialog_libedit_options_base.h index d360545f96..5d8691c1fe 100644 --- a/eeschema/dialogs/dialog_libedit_options_base.h +++ b/eeschema/dialogs/dialog_libedit_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version May 10 2016) +// C++ code generated with wxFormBuilder (version May 6 2016) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -74,7 +74,7 @@ class DIALOG_LIBEDIT_OPTIONS_BASE : public DIALOG_SHIM public: - DIALOG_LIBEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 499,528 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_LIBEDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Library Editor Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 499,368 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_LIBEDIT_OPTIONS_BASE(); }; diff --git a/eeschema/dialogs/dialog_netlist.cpp b/eeschema/dialogs/dialog_netlist.cpp index 44dcbdf8cd..bd42d3dd65 100644 --- a/eeschema/dialogs/dialog_netlist.cpp +++ b/eeschema/dialogs/dialog_netlist.cpp @@ -343,9 +343,11 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) : InstallCustomPages(); SetDefaultItem( m_buttonNetlist ); - GetSizer()->SetSizeHints( this ); - Centre(); + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index dc40e56a0d..39a0c2e98c 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -75,9 +75,11 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) : initDlg(); - GetSizer()->SetSizeHints( this ); - Centre(); + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_sch_edit_sheet_pin.cpp b/eeschema/dialogs/dialog_sch_edit_sheet_pin.cpp index e1d211315f..27997d846d 100644 --- a/eeschema/dialogs/dialog_sch_edit_sheet_pin.cpp +++ b/eeschema/dialogs/dialog_sch_edit_sheet_pin.cpp @@ -48,6 +48,12 @@ DIALOG_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN( wxWindow* parent ) : m_textName->SetFocus(); m_sdbSizerOK->SetDefault(); + + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); + // On some windows manager (Unity, XFCE), this dialog is // not always raised, depending on this dialog is run. // Force it to be raised diff --git a/eeschema/dialogs/dialog_sch_sheet_props.cpp b/eeschema/dialogs/dialog_sch_sheet_props.cpp index 8de6984bd6..795a56af41 100644 --- a/eeschema/dialogs/dialog_sch_sheet_props.cpp +++ b/eeschema/dialogs/dialog_sch_sheet_props.cpp @@ -34,7 +34,10 @@ DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS( wxWindow* parent ) : m_textFileName->SetFocus(); m_sdbSizer1OK->SetDefault(); - GetSizer()->Fit( this ); + FixOSXCancelButtonIssue(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); }