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
4b61440e
Commit
4b61440e
authored
Nov 07, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some problems (not all) when using wxAUI.
others minor bugs fix.
parent
277b843a
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
76 additions
and
41 deletions
+76
-41
drawframe.cpp
common/drawframe.cpp
+1
-1
cvframe.cpp
cvpcb/cvframe.cpp
+23
-13
displayframe.cpp
cvpcb/displayframe.cpp
+38
-3
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+10
-8
moduleframe.cpp
pcbnew/moduleframe.cpp
+1
-8
tool_modedit.cpp
pcbnew/tool_modedit.cpp
+1
-2
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+1
-2
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+1
-4
No files found.
common/drawframe.cpp
View file @
4b61440e
...
...
@@ -398,9 +398,9 @@ void WinEDA_DrawFrame::OnSize( wxSizeEvent& SizeEv )
GetClientSize
(
&
size
.
x
,
&
size
.
y
);
m_FrameSize
=
size
;
size
.
y
-=
m_MsgFrameHeight
;
#if !defined(KICAD_AUIMANAGER)
size
.
y
-=
m_MsgFrameHeight
;
if
(
MsgPanel
)
// Positionnement en bas d'ecran
{
MsgPanel
->
SetSize
(
0
,
size
.
y
,
size
.
x
,
m_MsgFrameHeight
);
...
...
cvpcb/cvframe.cpp
View file @
4b61440e
...
...
@@ -136,6 +136,12 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title,
if
(
m_FrameSize
.
y
<
FRAME_MIN_SIZE_Y
)
m_FrameSize
.
y
=
FRAME_MIN_SIZE_Y
;
// Set minimal frame width and height
SetSizeHints
(
FRAME_MIN_SIZE_X
,
FRAME_MIN_SIZE_Y
,
-
1
,
-
1
,
-
1
,
-
1
);
// Framesize and position
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
// create the status bar
static
const
int
dims
[
3
]
=
{
-
1
,
-
1
,
250
};
...
...
@@ -149,6 +155,7 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title,
BuildCmpListBox
();
BuildFOOTPRINTS_LISTBOX
();
#if !defined(KICAD_AUIMANAGER)
/* Create size constraints of the component list window display. */
wxLayoutConstraints
*
linkpos
=
new
wxLayoutConstraints
;
linkpos
->
top
.
SameAs
(
this
,
wxTop
);
...
...
@@ -166,12 +173,7 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title,
linkpos
->
left
.
SameAs
(
m_ListCmp
,
wxRight
);
if
(
m_FootprintList
)
m_FootprintList
->
SetConstraints
(
linkpos
);
// Set minimal frame width and height
SetSizeHints
(
FRAME_MIN_SIZE_X
,
FRAME_MIN_SIZE_Y
,
-
1
,
-
1
,
-
1
,
-
1
);
// Framesize and position
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
#endif
#if defined(KICAD_AUIMANAGER)
m_auimgr
.
SetManagedWindow
(
this
);
...
...
@@ -184,20 +186,17 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title,
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)
).
Top
()
);
m_auimgr
.
AddPane
(
m_ListCmp
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_ListCmp"
)
).
CentrePane
()
);
m_auimgr
.
AddPane
(
m_FootprintList
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_FootprintList"
)
).
Left
().
BestSize
(
m_FrameSize
.
x
*
0.3
,
m_FrameSize
.
y
*
0.9
)
);
m_auimgr
.
AddPane
(
m_ListCmp
,
wxAuiPaneInfo
().
Name
(
wxT
(
"m_ListCmp"
)
).
CentrePane
()
);
Right
().
BestSize
(
m_FrameSize
.
x
*
0.36
,
m_FrameSize
.
y
)
);
m_auimgr
.
Update
();
#endif
...
...
@@ -588,6 +587,17 @@ void WinEDA_CvpcbFrame::OnSelectComponent( wxListEvent& event )
*/
void
WinEDA_CvpcbFrame
::
OnSelectFilteringFootprint
(
wxCommandEvent
&
event
)
{
switch
(
event
.
GetId
()
)
{
case
ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST
:
m_HToolBar
->
ToggleTool
(
ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST
,
false
);
break
;
case
ID_CVPCB_FOOTPRINT_DISPLAY_FULL_LIST
:
m_HToolBar
->
ToggleTool
(
ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST
,
false
);
break
;
default
:
break
;
}
wxListEvent
l_event
;
OnSelectComponent
(
l_event
);
...
...
cvpcb/displayframe.cpp
View file @
4b61440e
...
...
@@ -25,7 +25,7 @@
BEGIN_EVENT_TABLE
(
WinEDA_DisplayFrame
,
WinEDA_BasePcbFrame
)
EVT_CLOSE
(
WinEDA_DisplayFrame
::
OnCloseWindow
)
EVT_SIZE
(
WinEDA_D
raw
Frame
::
OnSize
)
EVT_SIZE
(
WinEDA_D
isplay
Frame
::
OnSize
)
EVT_TOOL_RANGE
(
ID_ZOOM_IN
,
ID_ZOOM_PAGE
,
WinEDA_DisplayFrame
::
OnZoom
)
EVT_TOOL
(
ID_OPTIONS_SETUP
,
WinEDA_DisplayFrame
::
InstallOptionsDisplay
)
EVT_TOOL
(
ID_CVPCB_SHOW3D_FRAME
,
WinEDA_DisplayFrame
::
Show3D_Frame
)
...
...
@@ -59,8 +59,9 @@ WinEDA_DisplayFrame::WinEDA_DisplayFrame( WinEDA_CvpcbFrame* father,
LoadSettings
();
// Internalize grid id to a default value if not found in config or bad:
if
(
(
m_LastGridSizeId
<=
0
)
||
(
m_LastGridSizeId
<
(
ID_POPUP_GRID_USER
-
ID_POPUP_GRID_LEVEL_1000
))
)
(
m_LastGridSizeId
>
(
ID_POPUP_GRID_USER
-
ID_POPUP_GRID_LEVEL_1000
))
)
m_LastGridSizeId
=
ID_POPUP_GRID_LEVEL_500
-
ID_POPUP_GRID_LEVEL_1000
;
GetScreen
()
->
SetGrid
(
ID_POPUP_GRID_LEVEL_1000
+
m_LastGridSizeId
);
// Initialize some display options
DisplayOpt
.
DisplayPadIsol
=
false
;
// Pad clearance has no meaning here
...
...
@@ -71,6 +72,39 @@ WinEDA_DisplayFrame::WinEDA_DisplayFrame( WinEDA_CvpcbFrame* father,
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
ReCreateHToolbar
();
ReCreateVToolbar
();
#if defined(KICAD_AUIMANAGER)
m_auimgr
.
SetManagedWindow
(
this
);
wxAuiPaneInfo
horiz
;
horiz
.
Gripper
(
false
);
horiz
.
DockFixed
(
true
);
horiz
.
Movable
(
false
);
horiz
.
Floatable
(
false
);
horiz
.
CloseButton
(
false
);
horiz
.
CaptionVisible
(
false
);
wxAuiPaneInfo
vert
(
horiz
);
vert
.
TopDockable
(
false
).
BottomDockable
(
false
);
horiz
.
LeftDockable
(
false
).
RightDockable
(
false
);
m_auimgr
.
AddPane
(
m_HToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_HToolBar"
)
).
Top
().
Row
(
0
)
);
if
(
m_VToolBar
)
// Currently, no vertical right toolbar.
m_auimgr
.
AddPane
(
m_VToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)
).
Right
()
);
m_auimgr
.
AddPane
(
DrawPanel
,
wxAuiPaneInfo
().
Name
(
wxT
(
"DrawFrame"
)
).
CentrePane
()
);
m_auimgr
.
AddPane
(
MsgPanel
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"MsgPanel"
)
).
Bottom
()
);
m_auimgr
.
Update
();
#endif
Show
(
TRUE
);
}
...
...
@@ -85,7 +119,6 @@ WinEDA_DisplayFrame::~WinEDA_DisplayFrame()
(
(
WinEDA_CvpcbFrame
*
)
wxGetApp
().
GetTopWindow
()
)
->
DrawFrame
=
NULL
;
}
/* Called when the frame is closed
* Save current settings (frame position and size
*/
...
...
@@ -104,6 +137,8 @@ void WinEDA_DisplayFrame::OnCloseWindow( wxCloseEvent& event )
void
WinEDA_DisplayFrame
::
ReCreateVToolbar
()
{
// Currently, no vertical right toolbar.
// So do nothing
}
...
...
pcbnew/basepcbframe.cpp
View file @
4b61440e
...
...
@@ -381,19 +381,21 @@ void WinEDA_BasePcbFrame::LoadSettings()
wxConfig
*
cfg
=
wxGetApp
().
m_EDA_Config
;
WinEDA_DrawFrame
::
LoadSettings
();
// Ensure grid id is an existant grid id:
if
(
(
m_LastGridSizeId
<=
0
)
||
(
m_LastGridSizeId
>
(
ID_POPUP_GRID_USER
-
ID_POPUP_GRID_LEVEL_1000
))
)
m_LastGridSizeId
=
ID_POPUP_GRID_LEVEL_500
-
ID_POPUP_GRID_LEVEL_1000
;
cfg
->
Read
(
m_FrameName
+
UserGridSizeXEntry
,
&
m_UserGridSize
.
x
,
0.01
);
cfg
->
Read
(
m_FrameName
+
UserGridSizeYEntry
,
&
m_UserGridSize
.
y
,
0.01
);
cfg
->
Read
(
m_FrameName
+
UserGridUnitsEntry
,
&
m_UserGridUnits
,
(
long
)
INCHES
);
cfg
->
Read
(
m_FrameName
+
UserGridUnitsEntry
,
&
m_UserGridUnits
,
(
long
)
INCHES
);
cfg
->
Read
(
m_FrameName
+
DisplayPadFillEntry
,
&
m_DisplayPadFill
,
true
);
cfg
->
Read
(
m_FrameName
+
DisplayViaFillEntry
,
&
m_DisplayViaFill
,
true
);
//TODO: Will adding this line break tha pcbnew file compatibility?
cfg
->
Read
(
m_FrameName
+
DisplayViaFillEntry
,
&
m_DisplayViaFill
,
true
);
cfg
->
Read
(
m_FrameName
+
DisplayPadNumberEntry
,
&
m_DisplayPadNum
,
true
);
cfg
->
Read
(
m_FrameName
+
DisplayModuleEdgeEntry
,
&
m_DisplayModEdge
,
(
long
)
FILLED
);
cfg
->
Read
(
m_FrameName
+
DisplayModuleEdgeEntry
,
&
m_DisplayModEdge
,
(
long
)
FILLED
);
if
(
m_DisplayModEdge
<
FILAIRE
||
m_DisplayModEdge
>
SKETCH
)
m_DisplayModEdge
=
FILLED
;
cfg
->
Read
(
m_FrameName
+
DisplayModuleTextEntry
,
&
m_DisplayModText
,
(
long
)
FILLED
);
cfg
->
Read
(
m_FrameName
+
DisplayModuleTextEntry
,
&
m_DisplayModText
,
(
long
)
FILLED
);
if
(
m_DisplayModText
<
FILAIRE
||
m_DisplayModText
>
SKETCH
)
m_DisplayModText
=
FILLED
;
}
...
...
@@ -416,7 +418,7 @@ void WinEDA_BasePcbFrame::SaveSettings()
cfg
->
Write
(
m_FrameName
+
UserGridSizeYEntry
,
m_UserGridSize
.
y
);
cfg
->
Write
(
m_FrameName
+
UserGridUnitsEntry
,
(
long
)
m_UserGridUnits
);
cfg
->
Write
(
m_FrameName
+
DisplayPadFillEntry
,
m_DisplayPadFill
);
cfg
->
Write
(
m_FrameName
+
DisplayViaFillEntry
,
m_DisplayViaFill
);
//TODO: Will adding this line break tha pcbnew file compatibility?
cfg
->
Write
(
m_FrameName
+
DisplayViaFillEntry
,
m_DisplayViaFill
);
cfg
->
Write
(
m_FrameName
+
DisplayPadNumberEntry
,
m_DisplayPadNum
);
cfg
->
Write
(
m_FrameName
+
DisplayModuleEdgeEntry
,
(
long
)
m_DisplayModEdge
);
cfg
->
Write
(
m_FrameName
+
DisplayModuleTextEntry
,
(
long
)
m_DisplayModText
);
...
...
pcbnew/moduleframe.cpp
View file @
4b61440e
...
...
@@ -175,10 +175,6 @@ WinEDA_ModuleEditFrame::WinEDA_ModuleEditFrame( wxWindow* father,
ActiveScreen
=
GetScreen
();
GetScreen
()
->
SetCurItem
(
NULL
);
LoadSettings
();
// Initilialize grid id to a default value if not found in config or bad:
if
(
(
m_LastGridSizeId
<=
0
)
||
(
m_LastGridSizeId
<
(
ID_POPUP_GRID_USER
-
ID_POPUP_GRID_LEVEL_1000
))
)
m_LastGridSizeId
=
ID_POPUP_GRID_LEVEL_500
-
ID_POPUP_GRID_LEVEL_1000
;
GetScreen
()
->
AddGrid
(
m_UserGridSize
,
m_UserGridUnits
,
ID_POPUP_GRID_USER
);
GetScreen
()
->
SetGrid
(
ID_POPUP_GRID_LEVEL_1000
+
m_LastGridSizeId
);
...
...
@@ -400,10 +396,7 @@ void WinEDA_ModuleEditFrame::SetToolbars()
}
if
(
m_SelGridBox
)
{
m_SelGridBox
->
SetSelection
(
ID_POPUP_GRID_LEVEL_1000
+
m_LastGridSizeId
);
}
m_SelGridBox
->
SetSelection
(
m_LastGridSizeId
);
}
DisplayUnitsMsg
();
...
...
pcbnew/tool_modedit.cpp
View file @
4b61440e
...
...
@@ -319,8 +319,7 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar()
m_SelGridBox
->
Append
(
msg
,
(
void
*
)
&
GetScreen
()
->
m_GridList
[
i
].
m_Id
);
if
(
ID_POPUP_GRID_LEVEL_1000
+
m_LastGridSizeId
==
GetScreen
()
->
m_GridList
[
i
].
m_Id
)
if
(
m_LastGridSizeId
==
GetScreen
()
->
m_GridList
[
i
].
m_Id
)
m_SelGridBox
->
SetSelection
(
i
);
}
...
...
pcbnew/tool_pcb.cpp
View file @
4b61440e
...
...
@@ -665,8 +665,7 @@ an existing track use its width\notherwise, use current width setting" ),
m_SelGridBox
->
Append
(
msg
,
(
void
*
)
&
GetScreen
()
->
m_GridList
[
i
].
m_Id
);
if
(
ID_POPUP_GRID_LEVEL_1000
+
m_LastGridSizeId
==
GetScreen
()
->
m_GridList
[
i
].
m_Id
)
if
(
m_LastGridSizeId
==
GetScreen
()
->
m_GridList
[
i
].
m_Id
)
m_SelGridBox
->
SetSelection
(
i
);
}
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
4b61440e
...
...
@@ -138,10 +138,7 @@ void WinEDA_PcbFrame::AuxiliaryToolBar_Update_UI()
}
if
(
m_SelGridBox
)
{
m_SelGridBox
->
SetSelection
(
ID_POPUP_GRID_LEVEL_1000
+
m_LastGridSizeId
);
}
m_SelGridBox
->
SetSelection
(
m_LastGridSizeId
);
m_TrackAndViasSizesList_Changed
=
false
;
}
...
...
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