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
3c343b41
Commit
3c343b41
authored
Feb 01, 2015
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the minor bug 1016924 ( Unhandled event id 6263 in pcbnew ). Remove duplicate code.
parent
8412f2ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
46 deletions
+23
-46
class_DisplayFootprintsFrame.cpp
cvpcb/class_DisplayFootprintsFrame.cpp
+13
-26
edit.cpp
pcbnew/edit.cpp
+6
-4
moduleframe.cpp
pcbnew/moduleframe.cpp
+1
-13
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+3
-3
No files found.
cvpcb/class_DisplayFootprintsFrame.cpp
View file @
3c343b41
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 20
07 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 201
1
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2007-201
1
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 20
15 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 201
5
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2007-201
5
KiCad Developers, see AUTHORS.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
...
...
@@ -58,6 +58,7 @@ BEGIN_EVENT_TABLE( DISPLAY_FOOTPRINTS_FRAME, PCB_BASE_FRAME )
EVT_SIZE
(
DISPLAY_FOOTPRINTS_FRAME
::
OnSize
)
EVT_TOOL
(
ID_OPTIONS_SETUP
,
DISPLAY_FOOTPRINTS_FRAME
::
InstallOptionsDisplay
)
EVT_TOOL
(
ID_CVPCB_SHOW3D_FRAME
,
DISPLAY_FOOTPRINTS_FRAME
::
Show3D_Frame
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH
,
DISPLAY_FOOTPRINTS_FRAME
::
OnSelectOptionToolbar
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH
,
...
...
@@ -251,13 +252,10 @@ void DISPLAY_FOOTPRINTS_FRAME::OnUpdateTextDrawMode( wxUpdateUIEvent& aEvent )
wxString
msgTextsFill
[
2
]
=
{
_
(
"Show texts in filled mode"
),
_
(
"Show texts in sketch mode"
)
};
unsigned
i
=
displ_opts
->
m_DisplayModText
+
1
;
if
(
i
>
2
)
i
=
1
;
unsigned
i
=
displ_opts
->
m_DisplayModText
==
SKETCH
?
0
:
1
;
aEvent
.
Check
(
displ_opts
->
m_DisplayModText
==
1
);
m_optionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH
,
msgTextsFill
[
i
-
1
]
);
aEvent
.
Check
(
displ_opts
->
m_DisplayModText
==
SKETCH
);
m_optionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH
,
msgTextsFill
[
i
]
);
}
...
...
@@ -266,16 +264,13 @@ void DISPLAY_FOOTPRINTS_FRAME::OnUpdateLineDrawMode( wxUpdateUIEvent& aEvent )
{
DISPLAY_OPTIONS
*
displ_opts
=
(
DISPLAY_OPTIONS
*
)
GetDisplayOptions
();
wxString
msgEdgesFill
[
3
]
=
{
_
(
"Show outlines in filled mode"
),
wxString
msgEdgesFill
[
2
]
=
{
_
(
"Show outlines in filled mode"
),
_
(
"Show outlines in sketch mode"
)
};
int
i
=
displ_opts
->
m_DisplayModEdge
+
1
;
int
i
=
displ_opts
->
m_DisplayModEdge
==
SKETCH
?
0
:
1
;
if
(
i
>
2
)
i
=
1
;
aEvent
.
Check
(
displ_opts
->
m_DisplayModEdge
==
2
);
m_optionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH
,
msgEdgesFill
[
i
-
1
]
);
aEvent
.
Check
(
displ_opts
->
m_DisplayModEdge
==
SKETCH
);
m_optionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH
,
msgEdgesFill
[
i
]
);
}
...
...
@@ -303,20 +298,12 @@ void DISPLAY_FOOTPRINTS_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
switch
(
id
)
{
case
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH
:
displ_opts
->
m_DisplayModText
++
;
if
(
displ_opts
->
m_DisplayModText
>
2
)
displ_opts
->
m_DisplayModText
=
0
;
displ_opts
->
m_DisplayModText
=
displ_opts
->
m_DisplayModText
==
FILLED
?
SKETCH
:
FILLED
;
m_canvas
->
Refresh
(
);
break
;
case
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH
:
displ_opts
->
m_DisplayModEdge
++
;
if
(
displ_opts
->
m_DisplayModEdge
>
2
)
displ_opts
->
m_DisplayModEdge
=
0
;
displ_opts
->
m_DisplayModEdge
=
displ_opts
->
m_DisplayModEdge
==
FILLED
?
SKETCH
:
FILLED
;
m_canvas
->
Refresh
();
break
;
...
...
pcbnew/edit.cpp
View file @
3c343b41
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 201
2 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble
.fr
* Copyright (C) 201
2
SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 201
2
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-201
2
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 201
5 Jean-Pierre Charras, jp.charras at wanadoo
.fr
* Copyright (C) 201
5
SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 201
5
Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.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
...
...
@@ -110,6 +110,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_DELETE_ZONE
:
case
ID_POPUP_PCB_MOVE_ZONE_CORNER
:
case
ID_POPUP_PCB_DRAG_ZONE_OUTLINE_SEGMENT
:
case
ID_POPUP_PCB_PLACE_DRAGGED_ZONE_OUTLINE_SEGMENT
:
case
ID_POPUP_PCB_MOVE_ZONE_OUTLINES
:
case
ID_POPUP_PCB_ADD_ZONE_CORNER
:
case
ID_POPUP_PCB_DELETE_TRACKSEG
:
...
...
@@ -609,6 +610,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_PLACE_ZONE_OUTLINES
:
case
ID_POPUP_PCB_PLACE_ZONE_CORNER
:
case
ID_POPUP_PCB_PLACE_DRAGGED_ZONE_OUTLINE_SEGMENT
:
{
m_canvas
->
MoveCursorToCrossHair
();
ZONE_CONTAINER
*
zone_cont
=
(
ZONE_CONTAINER
*
)
GetCurItem
();
...
...
pcbnew/moduleframe.cpp
View file @
3c343b41
...
...
@@ -111,9 +111,7 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME )
EVT_TOOL_RANGE
(
ID_MODEDIT_PAD_TOOL
,
ID_MODEDIT_PLACE_GRID_COORD
,
FOOTPRINT_EDIT_FRAME
::
OnVerticalToolbar
)
// Options Toolbar
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_PADS_SKETCH
,
FOOTPRINT_EDIT_FRAME
::
OnSelectOptionToolbar
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_VIAS_SKETCH
,
FOOTPRINT_EDIT_FRAME
::
OnSelectOptionToolbar
)
// Options Toolbar (ID_TB_OPTIONS_SHOW_PADS_SKETCH id is managed in PCB_BASE_FRAME)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH
,
FOOTPRINT_EDIT_FRAME
::
OnSelectOptionToolbar
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH
,
FOOTPRINT_EDIT_FRAME
::
OnSelectOptionToolbar
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
,
FOOTPRINT_EDIT_FRAME
::
OnSelectOptionToolbar
)
...
...
@@ -181,8 +179,6 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME )
FOOTPRINT_EDIT_FRAME
::
OnUpdateVerticalToolbar
)
// Option toolbar:
EVT_UPDATE_UI
(
ID_TB_OPTIONS_SHOW_PADS_SKETCH
,
FOOTPRINT_EDIT_FRAME
::
OnUpdateOptionsToolbar
)
EVT_UPDATE_UI
(
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH
,
FOOTPRINT_EDIT_FRAME
::
OnUpdateOptionsToolbar
)
EVT_UPDATE_UI
(
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH
,
...
...
@@ -581,14 +577,6 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateOptionsToolbar( wxUpdateUIEvent& aEvent )
switch
(
id
)
{
case
ID_TB_OPTIONS_SHOW_PADS_SKETCH
:
state
=
!
displ_opts
->
m_DisplayPadFill
;
break
;
case
ID_TB_OPTIONS_SHOW_VIAS_SKETCH
:
state
=
!
displ_opts
->
m_DisplayViaFill
;
break
;
case
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH
:
state
=
displ_opts
->
m_DisplayModText
==
SKETCH
;
break
;
...
...
pcbnew/pcbnew_config.cpp
View file @
3c343b41
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 201
2 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble
.fr
* Copyright (C) 201
5 Jean-Pierre Charras, jp.charras at wanadoo
.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
...
...
@@ -96,8 +96,8 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
{
LAYER_ID
cur_layer
=
GetActiveLayer
();
// If after showing the dialog the user removed the active layer,
// then
use a sensible alternative layer to set as the active layer
.
// If after showing the dialog the user
has
removed the active layer,
// then
select a new active layer (front copper layer)
.
if
(
!
GetBoard
()
->
GetEnabledLayers
()[
cur_layer
]
)
cur_layer
=
F_Cu
;
...
...
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