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
ac97a574
Commit
ac97a574
authored
Feb 04, 2010
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gerbview: minor enhancements
parent
1173add9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
14 deletions
+15
-14
files.cpp
gerbview/files.cpp
+8
-8
gerberframe.cpp
gerbview/gerberframe.cpp
+2
-2
initpcb.cpp
gerbview/initpcb.cpp
+2
-1
tool_gerber.cpp
gerbview/tool_gerber.cpp
+3
-3
No files found.
gerbview/files.cpp
View file @
ac97a574
...
...
@@ -23,8 +23,9 @@ void WinEDA_GerberFrame::OnFileHistory( wxCommandEvent& event )
fn
=
GetFileFromHistory
(
event
.
GetId
(),
_
(
"Printed circuit board"
)
);
if
(
fn
!=
wxEmptyString
&&
Clear_Pcb
(
true
)
)
if
(
fn
!=
wxEmptyString
)
{
Erase_Current_Layer
(
false
);
LoadOneGerberFile
(
fn
,
false
);
}
}
...
...
@@ -37,11 +38,9 @@ void WinEDA_GerberFrame::Files_io( wxCommandEvent& event )
switch
(
id
)
{
case
ID_LOAD_FILE
:
if
(
Clear_Pcb
(
true
)
)
{
case
wxID_FILE
:
Erase_Current_Layer
(
false
);
LoadOneGerberFile
(
wxEmptyString
,
0
);
}
break
;
case
ID_MENU_INC_LAYER_AND_APPEND_FILE
:
...
...
@@ -173,8 +172,9 @@ bool WinEDA_GerberFrame::LoadOneGerberFile( const wxString& FullFileName,
/*
* Read a PCB file.
*
* Read a DCode file (not used with RX274X files , just with RS274D old files).
* Note: there is no standard for DCode file.
* Just read a file format created by early versions of Pcbnew.
* Returns:
* 0 if file not read (cancellation of order ...)
* 1 if OK
...
...
gerbview/gerberframe.cpp
View file @
ac97a574
...
...
@@ -29,7 +29,7 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame )
EVT_TOOL_RANGE
(
ID_ZOOM_IN
,
ID_ZOOM_PAGE
,
WinEDA_GerberFrame
::
OnZoom
)
EVT_TOOL
(
ID_LOA
D_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
wxI
D_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_APPEND_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_INC_LAYER_AND_APPEND_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_GERBVIEW_LOAD_DRILL_FILE
,
WinEDA_GerberFrame
::
Files_io
)
...
...
@@ -38,7 +38,7 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame )
EVT_TOOL
(
ID_SAVE_BOARD
,
WinEDA_GerberFrame
::
Files_io
)
// Menu Files:
EVT_MENU
(
ID_LOA
D_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
wxI
D_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
ID_APPEND_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
ID_MENU_INC_LAYER_AND_APPEND_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
ID_NEW_BOARD
,
WinEDA_GerberFrame
::
Files_io
)
...
...
gerbview/initpcb.cpp
View file @
ac97a574
...
...
@@ -45,6 +45,7 @@ bool WinEDA_GerberFrame::Clear_Pcb( bool query )
SetBaseScreen
(
ActiveScreen
=
ScreenPcb
);
GetScreen
()
->
Init
();
setActiveLayer
(
LAYER_N_BACK
);
return
TRUE
;
}
...
...
@@ -52,7 +53,7 @@ bool WinEDA_GerberFrame::Clear_Pcb( bool query )
void
WinEDA_GerberFrame
::
Erase_Current_Layer
(
bool
query
)
{
int
layer
=
GetScreen
()
->
m_Active_Layer
;
int
layer
=
getActiveLayer
()
;
wxString
msg
;
msg
.
Printf
(
_
(
"Delete layer %d?"
),
layer
+
1
);
...
...
gerbview/tool_gerber.cpp
View file @
ac97a574
...
...
@@ -26,8 +26,8 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
menuBar
=
new
wxMenuBar
();
wxMenu
*
filesMenu
=
new
wxMenu
;
filesMenu
->
Append
(
ID_LOAD_FILE
,
_
(
"Clear All and
Load Gerber File"
),
_
(
"
Clear all layers and Load a new Gerber file on firs
t layer"
),
filesMenu
->
Append
(
wxID_FILE
,
_
(
"
Load Gerber File"
),
_
(
"
Load a new Gerber file on the curren
t layer"
),
FALSE
);
filesMenu
->
Append
(
ID_APPEND_FILE
,
_
(
"Append Gerber File to Current Layer"
),
...
...
@@ -156,7 +156,7 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
wxBitmap
(
new_xpm
),
_
(
"New world"
)
);
m_HToolBar
->
AddTool
(
ID_LOA
D_FILE
,
wxEmptyString
,
m_HToolBar
->
AddTool
(
wxI
D_FILE
,
wxEmptyString
,
wxBitmap
(
open_xpm
),
_
(
"Open existing Layer"
)
);
...
...
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