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
141d5b5f
Commit
141d5b5f
authored
Jul 27, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed somes issues with wxWidgets 2.9.1
parent
68d652cd
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
34 deletions
+60
-34
selcolor.cpp
common/selcolor.cpp
+1
-1
eelayer.cpp
eeschema/eelayer.cpp
+1
-1
eelayer.h
eeschema/eelayer.h
+2
-2
gerberframe.cpp
gerbview/gerberframe.cpp
+32
-27
gerbview.cpp
gerbview/gerbview.cpp
+0
-1
tool_gerber.cpp
gerbview/tool_gerber.cpp
+14
-2
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+10
-0
No files found.
common/selcolor.cpp
View file @
141d5b5f
...
...
@@ -164,7 +164,7 @@ void WinEDA_SelColorFrame::Init_Dialog( int aOldColor )
iconDC
.
DrawRoundedRectangle
(
0
,
0
,
w
,
h
,
(
double
)
h
/
3
);
BitmapButton
=
new
wxBitmapButton
(
this
,
butt_ID
,
ButtBitmap
,
wxDefaultPosition
,
wxSize
(
w
,
h
)
);
wxDefaultPosition
,
wxSize
(
w
+
8
,
h
+
6
)
);
FlexColumnBoxSizer
->
Add
(
BitmapButton
,
0
,
wxALIGN_LEFT
|
wxALIGN_CENTER_VERTICAL
|
wxLEFT
|
wxBOTTOM
,
5
);
...
...
eeschema/eelayer.cpp
View file @
141d5b5f
...
...
@@ -199,7 +199,7 @@ void WinEDA_SetColorsFrame::CreateControls()
BitmapButton
=
new
wxBitmapButton
(
this
,
butt_ID
,
ButtBitmap
,
wxDefaultPosition
,
wxSize
(
BUTT_SIZE_X
,
BUTT_SIZE_Y
)
);
wxSize
(
BUTT_SIZE_X
+
8
,
BUTT_SIZE_Y
+
6
)
);
RowBoxSizer
->
Add
(
BitmapButton
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxRIGHT
|
wxBOTTOM
,
...
...
eeschema/eelayer.h
View file @
141d5b5f
...
...
@@ -38,8 +38,8 @@ enum col_sel_id {
#endif
// Specify the width and height of every (color-displaying / bitmap) button
const
int
BUTT_SIZE_X
=
30
;
const
int
BUTT_SIZE_Y
=
20
;
const
int
BUTT_SIZE_X
=
16
;
const
int
BUTT_SIZE_Y
=
16
;
// Macro utile :
#define ADR( numlayer ) & (g_LayerDescr.LayerColor[numlayer])
...
...
gerbview/gerberframe.cpp
View file @
141d5b5f
...
...
@@ -131,10 +131,13 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
m_show_layer_manager_tools
=
true
;
m_Draw_Axis
=
true
;
// true to show X and Y axis on screen
m_Draw_Sheet_Ref
=
FALSE
;
// TRUE
for reference drawings.
m_Draw_Sheet_Ref
=
false
;
// true
for reference drawings.
m_HotkeysZoomAndGridList
=
s_Gerbview_Hokeys_Descr
;
m_SelLayerBox
=
NULL
;
m_SelLayerTool
=
NULL
;
if
(
DrawPanel
)
DrawPanel
->
m_Block_Enable
=
TRUE
;
DrawPanel
->
m_Block_Enable
=
true
;
// Give an icon
#ifdef __WINDOWS__
...
...
@@ -238,7 +241,8 @@ void WinEDA_GerberFrame::OnCloseWindow( wxCloseEvent& Event )
*/
void
WinEDA_GerberFrame
::
SetToolbars
()
{
int
layer
=
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
;
PCB_SCREEN
*
screen
=
(
PCB_SCREEN
*
)
GetScreen
();
int
layer
=
screen
->
m_Active_Layer
;
GERBER
*
gerber
=
g_GERBER_List
[
layer
];
if
(
m_HToolBar
==
NULL
)
...
...
@@ -246,26 +250,26 @@ void WinEDA_GerberFrame::SetToolbars()
if
(
GetScreen
()
->
m_BlockLocate
.
m_Command
==
BLOCK_MOVE
)
{
m_HToolBar
->
EnableTool
(
wxID_CUT
,
TRUE
);
m_HToolBar
->
EnableTool
(
wxID_COPY
,
TRUE
);
m_HToolBar
->
EnableTool
(
wxID_CUT
,
true
);
m_HToolBar
->
EnableTool
(
wxID_COPY
,
true
);
}
else
{
m_HToolBar
->
EnableTool
(
wxID_CUT
,
FALSE
);
m_HToolBar
->
EnableTool
(
wxID_COPY
,
FALSE
);
m_HToolBar
->
EnableTool
(
wxID_CUT
,
false
);
m_HToolBar
->
EnableTool
(
wxID_COPY
,
false
);
}
if
(
m_SelLayerBox
->
GetSelection
()
!=
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
)
if
(
m_SelLayerBox
&&
(
m_SelLayerBox
->
GetSelection
()
!=
screen
->
m_Active_Layer
)
)
{
m_SelLayerBox
->
SetSelection
(
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
);
m_SelLayerBox
->
SetSelection
(
screen
->
m_Active_Layer
);
}
if
(
m_SelLayerTool
)
{
if
(
gerber
)
{
int
sel_index
;
m_SelLayerTool
->
Enable
(
TRUE
);
m_SelLayerTool
->
Enable
(
true
);
if
(
gerber
->
m_Selected_Tool
<
FIRST_DCODE
)
// No tool selected
sel_index
=
0
;
else
...
...
@@ -279,7 +283,8 @@ void WinEDA_GerberFrame::SetToolbars()
else
{
m_SelLayerTool
->
SetSelection
(
0
);
m_SelLayerTool
->
Enable
(
FALSE
);
m_SelLayerTool
->
Enable
(
false
);
}
}
if
(
m_OptionsToolBar
)
...
...
@@ -287,9 +292,9 @@ void WinEDA_GerberFrame::SetToolbars()
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SELECT_UNIT_MM
,
g_UserUnit
==
MILLIMETRES
?
TRUE
:
FALSE
);
MILLIMETRES
?
true
:
false
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SELECT_UNIT_INCH
,
g_UserUnit
==
INCHES
?
TRUE
:
FALSE
);
g_UserUnit
==
INCHES
?
true
:
false
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_POLAR_COORD
,
DisplayOpt
.
DisplayPolarCood
);
...
...
gerbview/gerbview.cpp
View file @
141d5b5f
...
...
@@ -105,7 +105,6 @@ bool WinEDA_App::OnInit()
* main frame in order to display the
* real hotkeys in menus or tool tips
*/
frame
=
new
WinEDA_GerberFrame
(
NULL
,
wxT
(
"GerbView"
),
wxPoint
(
0
,
0
),
wxSize
(
600
,
400
)
);
...
...
gerbview/tool_gerber.cpp
View file @
141d5b5f
...
...
@@ -3,6 +3,8 @@
/***************************************************/
#include "fctsys.h"
#include "wx/wupdlock.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "macros.h"
...
...
@@ -16,6 +18,8 @@
void
WinEDA_GerberFrame
::
ReCreateMenuBar
(
void
)
{
wxWindowUpdateLocker
dummy
(
this
);
wxMenuBar
*
menuBar
=
GetMenuBar
();
/* Destroy the existing menu bar so it can be rebuilt. This allows
...
...
@@ -143,6 +147,10 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
if
(
m_HToolBar
!=
NULL
)
return
;
// we create m_SelLayerTool that have a lot of items,
// so create a wxWindowUpdateLocker is a good idea
wxWindowUpdateLocker
dummy
(
this
);
if
(
GetScreen
()
)
{
layer
=
GetScreen
()
->
m_Active_Layer
;
...
...
@@ -214,11 +222,12 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
ID_TOOLBARH_GERBVIEW_SELECT_LAYER
,
wxDefaultPosition
,
wxSize
(
150
,
-
1
),
choices
);
m_SelLayerBox
->
SetSelection
(
getActiveLayer
()
);
m_HToolBar
->
AddControl
(
m_SelLayerBox
);
m_HToolBar
->
AddSeparator
();
choices
.
Clear
();
choices
.
Alloc
(
MAX_TOOLS
+
1
);
choices
.
Add
(
_
(
"No tool"
)
);
for
(
ii
=
0
;
ii
<
MAX_TOOLS
;
ii
++
)
...
...
@@ -227,7 +236,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
msg
=
_
(
"Tool "
);
msg
<<
ii
+
FIRST_DCODE
;
choices
.
Add
(
msg
);
}
m_SelLayerTool
=
new
WinEDAChoiceBox
(
m_HToolBar
,
ID_TOOLBARH_GERBER_SELECT_TOOL
,
wxDefaultPosition
,
wxSize
(
150
,
-
1
),
...
...
@@ -250,6 +258,8 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void )
if
(
m_VToolBar
)
return
;
wxWindowUpdateLocker
dummy
(
this
);
m_VToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_TOOL
,
this
,
ID_V_TOOLBAR
,
FALSE
);
// Set up toolbar
...
...
@@ -274,6 +284,8 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )
if
(
m_OptionsToolBar
)
return
;
wxWindowUpdateLocker
dummy
(
this
);
// creation of tool bar options
m_OptionsToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_OPTION
,
this
,
ID_OPT_TOOLBAR
,
FALSE
);
...
...
pcbnew/tool_pcb.cpp
View file @
141d5b5f
...
...
@@ -3,6 +3,7 @@
/***************************************/
#include "fctsys.h"
#include "wx/wupdlock.h"
#include "common.h"
#include "pcbnew.h"
...
...
@@ -180,6 +181,7 @@ void WinEDA_PcbFrame::ReCreateHToolbar()
return
;
}
wxWindowUpdateLocker
dummy
(
this
);
m_HToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_MAIN
,
this
,
ID_H_TOOLBAR
,
true
);
m_HToolBar
->
SetRows
(
1
);
...
...
@@ -295,6 +297,8 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
if
(
m_OptionsToolBar
)
return
;
wxWindowUpdateLocker
dummy
(
this
);
m_OptionsToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_OPTION
,
this
,
ID_OPT_TOOLBAR
,
FALSE
);
...
...
@@ -396,6 +400,8 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
if
(
m_VToolBar
)
return
;
wxWindowUpdateLocker
dummy
(
this
);
m_VToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_TOOL
,
this
,
ID_V_TOOLBAR
,
FALSE
);
// Set up toolbar
...
...
@@ -481,6 +487,8 @@ void WinEDA_PcbFrame::ReCreateMicrowaveVToolbar()
if
(
m_AuxVToolBar
)
return
;
wxWindowUpdateLocker
dummy
(
this
);
m_AuxVToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_TOOL
,
this
,
ID_MICROWAVE_V_TOOLBAR
,
FALSE
);
...
...
@@ -528,6 +536,8 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
size_t
i
;
wxString
msg
;
wxWindowUpdateLocker
dummy
(
this
);
if
(
m_AuxiliaryToolBar
==
NULL
)
{
m_AuxiliaryToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_AUX
,
this
,
...
...
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