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
eef494d9
Commit
eef494d9
authored
Mar 17, 2015
by
unknown
Committed by
jean-pierre charras
Mar 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: Fix an Incorrect save-on-quit in pcbnew with unamed board
parent
115cb2d6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
7 deletions
+32
-7
wxPcbStruct.h
include/wxPcbStruct.h
+19
-1
files.cpp
pcbnew/files.cpp
+10
-5
pcbframe.cpp
pcbnew/pcbframe.cpp
+3
-1
No files found.
include/wxPcbStruct.h
View file @
eef494d9
...
...
@@ -849,10 +849,28 @@ public:
/**
* Function Files_io
* is the command event handler for read and write file commands.
* @param event is the command event handler.
* do nothing else than call Files_io_from_id with the
* wxCommandEvent id
*/
void
Files_io
(
wxCommandEvent
&
event
);
/**
* Function Files_io_from_id
* Read and write board files
* @param aId is an event ID ciming from file command events:
* ID_LOAD_FILE
* ID_MENU_READ_BOARD_BACKUP_FILE
* ID_MENU_RECOVER_BOARD_AUTOSAVE
* ID_APPEND_FILE
* ID_NEW_BOARD
* ID_SAVE_BOARD
* ID_COPY_BOARD_AS
* ID_SAVE_BOARD_AS
* Files_io_from_id prepare parameters and calls the specialized function
*/
void
Files_io_from_id
(
int
aId
);
/**
* Function OpenProjectFiles (was LoadOnePcbFile)
* loads a KiCad board (.kicad_pcb) from \a aFileName.
...
...
pcbnew/files.cpp
View file @
eef494d9
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004-201
0 Jean-Pierre Charras, jean-pierre.charras@gpisa-lab.inpg
.fr
* Copyright (C) 2004-201
5 Jean-Pierre Charras, jp.charras at wanadoo
.fr
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 201
0
KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 201
5
KiCad Developers, see change_log.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
...
...
@@ -222,6 +222,11 @@ void PCB_EDIT_FRAME::OnFileHistory( wxCommandEvent& event )
void
PCB_EDIT_FRAME
::
Files_io
(
wxCommandEvent
&
event
)
{
int
id
=
event
.
GetId
();
Files_io_from_id
(
id
);
}
void
PCB_EDIT_FRAME
::
Files_io_from_id
(
int
id
)
{
wxString
msg
;
// If an edition is in progress, stop it.
...
...
pcbnew/pcbframe.cpp
View file @
eef494d9
...
...
@@ -595,7 +595,9 @@ void PCB_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
break
;
case
wxID_YES
:
SavePcbFile
(
GetBoard
()
->
GetFileName
()
);
// save the board. if the board has no name,
// the ID_SAVE_BOARD_AS will actually made
Files_io_from_id
(
ID_SAVE_BOARD
);
break
;
}
}
...
...
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