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
dcba4804
Commit
dcba4804
authored
Jan 21, 2010
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version 2.9 compatibility fix for wxSizer::Insert()
parent
58fc9d8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
layer_widget.cpp
pcbnew/layer_widget.cpp
+7
-7
No files found.
pcbnew/layer_widget.cpp
View file @
dcba4804
...
...
@@ -378,7 +378,7 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec )
*
m_BlankBitmap
,
wxDefaultPosition
,
m_BitmapSize
);
sbm
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
LAYER_WIDGET
::
OnLeftDownLayers
),
NULL
,
this
);
sbm
->
Connect
(
wxEVT_RIGHT_DOWN
,
wxMouseEventHandler
(
LAYER_WIDGET
::
OnRightDownLayers
),
NULL
,
this
);
m_LayersFlexGridSizer
->
Insert
(
index
+
col
,
sbm
,
0
,
flags
);
m_LayersFlexGridSizer
->
wxSizer
::
Insert
(
index
+
col
,
sbm
,
0
,
flags
);
// column 1
col
=
1
;
...
...
@@ -387,7 +387,7 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec )
bmb
->
Connect
(
wxEVT_MIDDLE_DOWN
,
wxMouseEventHandler
(
LAYER_WIDGET
::
OnMiddleDownLayerColor
),
NULL
,
this
);
bmb
->
Connect
(
wxEVT_RIGHT_DOWN
,
wxMouseEventHandler
(
LAYER_WIDGET
::
OnRightDownLayers
),
NULL
,
this
);
bmb
->
SetToolTip
(
_
(
"Left click to select, middle click for color change, right click for menu"
)
);
m_LayersFlexGridSizer
->
Insert
(
index
+
col
,
bmb
,
0
,
flags
);
m_LayersFlexGridSizer
->
wxSizer
::
Insert
(
index
+
col
,
bmb
,
0
,
flags
);
// column 2
col
=
2
;
...
...
@@ -395,7 +395,7 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec )
st
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
LAYER_WIDGET
::
OnLeftDownLayers
),
NULL
,
this
);
st
->
Connect
(
wxEVT_RIGHT_DOWN
,
wxMouseEventHandler
(
LAYER_WIDGET
::
OnRightDownLayers
),
NULL
,
this
);
st
->
SetToolTip
(
aSpec
.
tooltip
);
m_LayersFlexGridSizer
->
Insert
(
index
+
col
,
st
,
0
,
flags
);
m_LayersFlexGridSizer
->
wxSizer
::
Insert
(
index
+
col
,
st
,
0
,
flags
);
// column 3
col
=
3
;
...
...
@@ -403,7 +403,7 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec )
cb
->
SetValue
(
aSpec
.
state
);
cb
->
Connect
(
wxEVT_COMMAND_CHECKBOX_CLICKED
,
wxCommandEventHandler
(
LAYER_WIDGET
::
OnLayerCheckBox
),
NULL
,
this
);
cb
->
SetToolTip
(
_
(
"Enable this for visibility"
)
);
m_LayersFlexGridSizer
->
Insert
(
index
+
col
,
cb
,
0
,
flags
);
m_LayersFlexGridSizer
->
wxSizer
::
Insert
(
index
+
col
,
cb
,
0
,
flags
);
}
...
...
@@ -422,7 +422,7 @@ void LAYER_WIDGET::insertRenderRow( int aRow, const ROW& aSpec )
wxBitmapButton
*
bmb
=
makeColorButton
(
m_RenderScrolledWindow
,
aSpec
.
color
,
encodeId
(
col
,
aSpec
.
id
)
);
bmb
->
Connect
(
wxEVT_MIDDLE_DOWN
,
wxMouseEventHandler
(
LAYER_WIDGET
::
OnMiddleDownRenderColor
),
NULL
,
this
);
bmb
->
SetToolTip
(
_
(
"Middle click for color change"
)
);
m_RenderFlexGridSizer
->
Insert
(
index
+
col
,
bmb
,
0
,
flags
);
m_RenderFlexGridSizer
->
wxSizer
::
Insert
(
index
+
col
,
bmb
,
0
,
flags
);
// could add a left click handler on the color button that toggles checkbox.
}
...
...
@@ -430,7 +430,7 @@ void LAYER_WIDGET::insertRenderRow( int aRow, const ROW& aSpec )
{
// need a place holder within the sizer to keep grid full.
wxPanel
*
invisible
=
new
wxPanel
(
m_RenderScrolledWindow
);
m_RenderFlexGridSizer
->
Insert
(
index
+
col
,
invisible
,
0
,
flags
);
m_RenderFlexGridSizer
->
wxSizer
::
Insert
(
index
+
col
,
invisible
,
0
,
flags
);
}
// column 1
...
...
@@ -440,7 +440,7 @@ void LAYER_WIDGET::insertRenderRow( int aRow, const ROW& aSpec )
cb
->
Connect
(
wxEVT_COMMAND_CHECKBOX_CLICKED
,
wxCommandEventHandler
(
LAYER_WIDGET
::
OnRenderCheckBox
),
NULL
,
this
);
cb
->
SetToolTip
(
aSpec
.
tooltip
);
m_RenderFlexGridSizer
->
Insert
(
index
+
col
,
cb
,
0
,
flags
);
m_RenderFlexGridSizer
->
wxSizer
::
Insert
(
index
+
col
,
cb
,
0
,
flags
);
}
...
...
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