Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
698bd331
Commit
698bd331
authored
Feb 10, 2015
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dialog enum pads: fix incorrect use of sizers.
parent
80f6a4f2
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
162 additions
and
62 deletions
+162
-62
dialog_enum_pads.cpp
pcbnew/dialogs/dialog_enum_pads.cpp
+4
-0
dialog_enum_pads_base.cpp
pcbnew/dialogs/dialog_enum_pads_base.cpp
+22
-19
dialog_enum_pads_base.fbp
pcbnew/dialogs/dialog_enum_pads_base.fbp
+123
-33
dialog_enum_pads_base.h
pcbnew/dialogs/dialog_enum_pads_base.h
+10
-5
modedit.cpp
pcbnew/modedit.cpp
+3
-5
No files found.
pcbnew/dialogs/dialog_enum_pads.cpp
View file @
698bd331
...
...
@@ -27,6 +27,10 @@
DIALOG_ENUM_PADS
::
DIALOG_ENUM_PADS
(
wxWindow
*
aParent
)
:
DIALOG_ENUM_PADS_BASE
(
aParent
)
{
// Calling SetSizeHints after all widgets are built is mandatory
// to set the correct size of the dialog
GetSizer
()
->
SetSizeHints
(
this
);
Center
();
}
...
...
pcbnew/dialogs/dialog_enum_pads_base.cpp
View file @
698bd331
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 30 2013
)
// C++ code generated with wxFormBuilder (version
Jun 5 2014
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -9,43 +9,46 @@
///////////////////////////////////////////////////////////////////////////
DIALOG_ENUM_PADS_BASE
::
DIALOG_ENUM_PADS_BASE
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
:
wxDialog
(
parent
,
id
,
title
,
pos
,
size
,
style
)
DIALOG_ENUM_PADS_BASE
::
DIALOG_ENUM_PADS_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
);
wxBoxSizer
*
bMainSizer
;
bMainSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
wxBoxSizer
*
bPrefixSizer
;
bPrefixSizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
m_lblInfo
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Pad names are restricted to 4 characters (including number)."
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_lblInfo
->
Wrap
(
-
1
);
bMainSizer
->
Add
(
m_lblInfo
,
0
,
wxALL
|
wxALIGN_CENTER_HORIZONTAL
,
5
);
bMainSizer
->
Add
(
0
,
0
,
0
,
wxTOP
|
wxBOTTOM
,
5
);
wxFlexGridSizer
*
fgSizer
;
fgSizer
=
new
wxFlexGridSizer
(
0
,
2
,
0
,
0
);
fgSizer
->
AddGrowableCol
(
1
);
fgSizer
->
SetFlexibleDirection
(
wxBOTH
);
fgSizer
->
SetNonFlexibleGrowMode
(
wxFLEX_GROWMODE_SPECIFIED
);
m_lblPadPrefix
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Pad name prefix:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_lblPadPrefix
->
Wrap
(
-
1
);
bPrefixSizer
->
Add
(
m_lblPadPrefix
,
1
,
wxAL
L
,
5
);
fgSizer
->
Add
(
m_lblPadPrefix
,
0
,
wxALL
|
wxALIGN_CENTER_VERTICA
L
,
5
);
m_padPrefix
=
new
wxTextCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_padPrefix
->
SetMaxLength
(
4
);
bPrefixSizer
->
Add
(
m_padPrefix
,
0
,
wxALL
,
5
);
bMainSizer
->
Add
(
bPrefixSizer
,
1
,
wxEXPAND
,
5
);
wxBoxSizer
*
bPadNumSizer
;
bPadNumSizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
fgSizer
->
Add
(
m_padPrefix
,
0
,
wxALL
|
wxEXPAND
|
wxALIGN_CENTER_VERTICAL
,
5
);
m_lblPadStartNum
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"First pad number:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_lblPadStartNum
->
Wrap
(
-
1
);
bPadNumSizer
->
Add
(
m_lblPadStartNum
,
1
,
wxAL
L
,
5
);
fgSizer
->
Add
(
m_lblPadStartNum
,
0
,
wxALL
|
wxALIGN_CENTER_VERTICA
L
,
5
);
m_padStartNum
=
new
wxSpinCtrl
(
this
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxDefaultSize
,
wxSP_ARROW_KEYS
,
0
,
999
,
1
);
bPadNumSizer
->
Add
(
m_padStartNum
,
0
,
wxALL
,
5
);
fgSizer
->
Add
(
m_padStartNum
,
0
,
wxALL
|
wxEXPAND
,
5
);
bMainSizer
->
Add
(
bPadNumSizer
,
1
,
wxEXPAND
,
5
);
bMainSizer
->
Add
(
fgSizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
m_lblInfo
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Pad names are restricted to 4 characters (including number)."
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_lblInfo
->
Wrap
(
320
);
bMainSizer
->
Add
(
m_lblInfo
,
0
,
wxALL
,
5
);
m_staticline1
=
new
wxStaticLine
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLI_HORIZONTAL
);
bMainSizer
->
Add
(
m_staticline1
,
0
,
wxEXPAND
|
wxALL
,
5
);
m_stdButtons
=
new
wxStdDialogButtonSizer
();
m_stdButtonsOK
=
new
wxButton
(
this
,
wxID_OK
);
...
...
@@ -54,7 +57,7 @@ DIALOG_ENUM_PADS_BASE::DIALOG_ENUM_PADS_BASE( wxWindow* parent, wxWindowID id, c
m_stdButtons
->
AddButton
(
m_stdButtonsCancel
);
m_stdButtons
->
Realize
();
bMainSizer
->
Add
(
m_stdButtons
,
2
,
wxEXPAND
,
5
);
bMainSizer
->
Add
(
m_stdButtons
,
0
,
wxEXPAND
|
wxALL
,
5
);
this
->
SetSizer
(
bMainSizer
);
...
...
pcbnew/dialogs/dialog_enum_pads_base.fbp
View file @
698bd331
This diff is collapsed.
Click to expand it.
pcbnew/dialogs/dialog_enum_pads_base.h
View file @
698bd331
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 30 2013
)
// C++ code generated with wxFormBuilder (version
Jun 5 2014
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -11,6 +11,9 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class
DIALOG_SHIM
;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
...
...
@@ -18,8 +21,9 @@
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/sizer.h>
#include <wx/spinctrl.h>
#include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/button.h>
#include <wx/dialog.h>
...
...
@@ -29,23 +33,24 @@
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_ENUM_PADS_BASE
///////////////////////////////////////////////////////////////////////////////
class
DIALOG_ENUM_PADS_BASE
:
public
wxDialog
class
DIALOG_ENUM_PADS_BASE
:
public
DIALOG_SHIM
{
private
:
protected
:
wxStaticText
*
m_lblInfo
;
wxStaticText
*
m_lblPadPrefix
;
wxTextCtrl
*
m_padPrefix
;
wxStaticText
*
m_lblPadStartNum
;
wxSpinCtrl
*
m_padStartNum
;
wxStatic
Text
*
m_lblInfo
;
wxStatic
Line
*
m_staticline1
;
wxStdDialogButtonSizer
*
m_stdButtons
;
wxButton
*
m_stdButtonsOK
;
wxButton
*
m_stdButtonsCancel
;
public
:
DIALOG_ENUM_PADS_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Pad enumeration settings"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
340
,
240
),
long
style
=
wxDEFAULT_DIALOG_STYLE
);
DIALOG_ENUM_PADS_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Pad enumeration settings"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
340
,
187
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_ENUM_PADS_BASE
();
};
...
...
pcbnew/modedit.cpp
View file @
698bd331
...
...
@@ -315,9 +315,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
Zoom_Automatique
(
false
);
}
if
(
IsGalCanvasActive
()
)
updateView
();
updateView
();
m_canvas
->
Refresh
();
GetScreen
()
->
ClrModify
();
...
...
@@ -562,10 +560,10 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
if
(
m_Draw3DFrame
)
m_Draw3DFrame
->
NewDisplay
();
m_canvas
->
Refresh
();
GetScreen
()
->
ClrModify
();
updateView
();
m_canvas
->
Refresh
();
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment