diff --git a/common/hotkeys_basic.cpp b/common/hotkeys_basic.cpp index 311ceb175c..f0928402f6 100644 --- a/common/hotkeys_basic.cpp +++ b/common/hotkeys_basic.cpp @@ -419,6 +419,8 @@ int KeyCodeFromKeyName( const wxString& keyname ) * Displays the current hotkey list * aList = a EDA_HOTKEY_CONFIG list(Null terminated) */ +#include + void DisplayHotkeyList( EDA_BASE_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescList ) { wxString keyname; @@ -453,7 +455,17 @@ void DisplayHotkeyList( EDA_BASE_FRAME* aFrame, struct EDA_HOTKEY_CONFIG* aDescL } msg += wxT( "" ); + +#if 0 // Set to 1 to create a modal dialog (blocking) DisplayHtmlInfoMessage( aFrame, _( "Hotkeys List" ), msg, wxSize( 340, 750 ) ); +#else + // Create a non modal dialog, which shows the list of hotkeys until dismissed + // but does not block the parent window + HTML_MESSAGE_BOX *dlg = new HTML_MESSAGE_BOX( aFrame, _( "Hotkeys List" ), + wxDefaultPosition, wxSize( 340, 750 ) ); + dlg->AddHTML_Text( msg ); + dlg->Show( true ); +#endif } diff --git a/eeschema/dialogs/dialog_sch_edit_sheet_pin.cpp b/eeschema/dialogs/dialog_sch_edit_sheet_pin.cpp index db418e7dc8..e1d211315f 100644 --- a/eeschema/dialogs/dialog_sch_edit_sheet_pin.cpp +++ b/eeschema/dialogs/dialog_sch_edit_sheet_pin.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2010 Wayne Stambaugh - * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors. + * Copyright (C) 2015 KiCad Developers, see CHANGELOG.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 @@ -46,5 +46,10 @@ DIALOG_SCH_EDIT_SHEET_PIN::DIALOG_SCH_EDIT_SHEET_PIN( wxWindow* parent ) : m_choiceConnectionType->SetSelection( 0 ); m_textName->SetFocus(); - m_sdbSizer2OK->SetDefault(); + m_sdbSizerOK->SetDefault(); + + // On some windows manager (Unity, XFCE), this dialog is + // not always raised, depending on this dialog is run. + // Force it to be raised + Raise(); } diff --git a/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.cpp b/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.cpp index 701b292069..8fe85fd423 100644 --- a/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.cpp +++ b/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////// -DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_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( wxSize( 350,-1 ), wxDefaultSize ); @@ -30,6 +30,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent fgSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 6 ); m_textName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_textName->SetMaxLength( 0 ); fgSizer1->Add( m_textName, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 6 ); @@ -40,6 +41,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 ); m_textHeight = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_textHeight->SetMaxLength( 0 ); fgSizer1->Add( m_textHeight, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 ); m_staticHeightUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -51,6 +53,7 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent fgSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 6 ); m_textWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_textWidth->SetMaxLength( 0 ); fgSizer1->Add( m_textWidth, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 6 ); m_staticWidthUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -69,20 +72,24 @@ DIALOG_SCH_EDIT_SHEET_PIN_BASE::DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent fgSizer1->Add( 0, 0, 1, wxEXPAND, 6 ); + m_nameSizer->Add( fgSizer1, 1, wxEXPAND, 6 ); + m_mainSizer->Add( m_nameSizer, 1, wxALL|wxEXPAND, 6 ); m_mainSizer->Add( 0, 0, 0, wxALL|wxEXPAND, 3 ); - m_sdbSizer2 = new wxStdDialogButtonSizer(); - m_sdbSizer2OK = new wxButton( this, wxID_OK ); - m_sdbSizer2->AddButton( m_sdbSizer2OK ); - m_sdbSizer2Cancel = new wxButton( this, wxID_CANCEL ); - m_sdbSizer2->AddButton( m_sdbSizer2Cancel ); - m_sdbSizer2->Realize(); - m_mainSizer->Add( m_sdbSizer2, 0, wxALL|wxEXPAND, 6 ); + m_sdbSizer = new wxStdDialogButtonSizer(); + m_sdbSizerOK = new wxButton( this, wxID_OK ); + m_sdbSizer->AddButton( m_sdbSizerOK ); + m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizer->AddButton( m_sdbSizerCancel ); + m_sdbSizer->Realize(); + + m_mainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 6 ); + this->SetSizer( m_mainSizer ); this->Layout(); diff --git a/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.fbp b/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.fbp index b69d7ed62e..919a60930a 100644 --- a/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.fbp +++ b/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.fbp @@ -1,12 +1,14 @@ - + C++ 1 source_name + 0 0 + res UTF-8 connect dialog_sch_edit_sheet_pin_base @@ -18,10 +20,15 @@ . 1 + 1 + 1 1 + UI 0 0 + 0 + wxAUI_MGR_DEFAULT wxBOTH @@ -39,18 +46,20 @@ 350,189 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + DIALOG_SHIM; dialog_shim.h Sheet Pin Properties - - wxFILTER_NONE - wxDefaultValidator - + + + + + + @@ -114,28 +123,55 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Name: + + 0 + + 0 + 1 m_staticText1 + 1 + + protected + 1 + Resizable + 1 + 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -170,23 +206,54 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + + 0 + 1 m_textName + 1 + + protected + 1 + Resizable + 1 + 0 wxFILTER_NONE @@ -240,28 +307,55 @@ wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Text height: + + 0 + + 0 + 1 m_staticText2 + 1 + + protected + 1 + Resizable + 1 + 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -296,23 +390,54 @@ wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + + 0 + 1 m_textHeight + 1 + + protected + 1 + Resizable + 1 + 0 wxFILTER_NUMERIC @@ -356,28 +481,55 @@ wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY units + + 0 + + 0 + 1 m_staticHeightUnits + 1 + + protected + 1 + Resizable + 1 + 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -412,28 +564,55 @@ wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Text width: + + 0 + + 0 + 1 m_staticText5 + 1 + + protected + 1 + Resizable + 1 + 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -468,23 +647,54 @@ wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 0 + + 0 + 1 m_textWidth + 1 + + protected + 1 + Resizable + 1 + 0 wxFILTER_NONE @@ -528,28 +738,55 @@ wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY units + + 0 + + 0 + 1 m_staticWidthUnits + 1 + + protected + 1 + Resizable + 1 + 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -584,28 +821,55 @@ wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY Connection type: + + 0 + + 0 + 1 m_staticText3 + 1 + + protected + 1 + Resizable + 1 + 0 - - wxFILTER_NONE - wxDefaultValidator - @@ -640,23 +904,55 @@ wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT 0 + 1 + 1 + 1 + 1 + + + + + + + 1 + 0 + 1 1 + 0 + Dock + 0 + Left 1 + 1 + 0 0 wxID_ANY + + 0 + + 0 + 1 m_choiceConnectionType + 1 + + protected + 1 + Resizable 0 + 1 + + 0 wxFILTER_NONE @@ -729,7 +1025,7 @@ 0 0 - m_sdbSizer2 + m_sdbSizer protected diff --git a/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.h b/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.h index 8efda1932a..fb19f936dd 100644 --- a/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.h +++ b/eeschema/dialogs/dialog_sch_edit_sheet_pin_base.h @@ -1,15 +1,19 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 8 2010) +// C++ code generated with wxFormBuilder (version Jun 5 2014) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __dialog_sch_edit_sheet_pin_base__ -#define __dialog_sch_edit_sheet_pin_base__ +#ifndef __DIALOG_SCH_EDIT_SHEET_PIN_BASE_H__ +#define __DIALOG_SCH_EDIT_SHEET_PIN_BASE_H__ +#include +#include #include +class DIALOG_SHIM; +#include "dialog_shim.h" #include #include #include @@ -28,14 +32,13 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_SCH_EDIT_SHEET_PIN_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_SCH_EDIT_SHEET_PIN_BASE : public wxDialog +class DIALOG_SCH_EDIT_SHEET_PIN_BASE : public DIALOG_SHIM { private: protected: wxStaticText* m_staticText1; wxTextCtrl* m_textName; - wxStaticText* m_staticText2; wxTextCtrl* m_textHeight; wxStaticText* m_staticHeightUnits; @@ -44,17 +47,15 @@ class DIALOG_SCH_EDIT_SHEET_PIN_BASE : public wxDialog wxStaticText* m_staticWidthUnits; wxStaticText* m_staticText3; wxChoice* m_choiceConnectionType; - - - wxStdDialogButtonSizer* m_sdbSizer2; - wxButton* m_sdbSizer2OK; - wxButton* m_sdbSizer2Cancel; + wxStdDialogButtonSizer* m_sdbSizer; + wxButton* m_sdbSizerOK; + wxButton* m_sdbSizerCancel; public: - DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sheet Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,189 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_SCH_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sheet Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 350,189 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_SCH_EDIT_SHEET_PIN_BASE(); }; -#endif //__dialog_sch_edit_sheet_pin_base__ +#endif //__DIALOG_SCH_EDIT_SHEET_PIN_BASE_H__ diff --git a/kicad/class_treeproject_item.cpp b/kicad/class_treeproject_item.cpp index dd5edaee51..e257b84a63 100644 --- a/kicad/class_treeproject_item.cpp +++ b/kicad/class_treeproject_item.cpp @@ -54,6 +54,7 @@ TREEPROJECT_ITEM::TREEPROJECT_ITEM( enum TreeFileType type, const wxString& data SetFileName( data ); SetRootFile( false ); // true only for the root item of the tree (the project name) SetPopulated( false ); + m_state = 0; } diff --git a/polygon/SutherlandHodgmanClipPoly.h b/polygon/SutherlandHodgmanClipPoly.h index 43512bf9f8..506ee0f324 100644 --- a/polygon/SutherlandHodgmanClipPoly.h +++ b/polygon/SutherlandHodgmanClipPoly.h @@ -183,9 +183,11 @@ private: { public: ClipStage( Stage& nextStage, REAL position ) : - Boundary( position ) , m_NextStage( nextStage ), m_bFirst( true ) + Boundary( position ) , m_NextStage( nextStage ), m_bFirst( true ), m_bPreviousInside( false ) { } - void HandleVertex( const PointF& pntCurrent ) // Function to handle one vertex + + // Function to handle one vertex + void HandleVertex( const PointF& pntCurrent ) { bool bCurrentInside = this->IsInside( pntCurrent ); // See if vertex is inside the boundary.