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
ed5585eb
Commit
ed5585eb
authored
Mar 06, 2012
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Libedit: fix bug (svg export does not work)
other minor fixes.
parent
f13e0203
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
962 additions
and
911 deletions
+962
-911
bitmap2cmp_gui_base.fbp
bitmap2component/bitmap2cmp_gui_base.fbp
+878
-878
basicframe.cpp
common/basicframe.cpp
+6
-7
CMakeLists.txt
demos/CMakeLists.txt
+2
-1
dialog_SVG_print.cpp
eeschema/dialogs/dialog_SVG_print.cpp
+7
-1
libedit.cpp
eeschema/libedit.cpp
+12
-7
libedit_plot_component.cpp
eeschema/libedit_plot_component.cpp
+6
-0
libeditframe.cpp
eeschema/libeditframe.cpp
+0
-6
libeditframe.h
eeschema/libeditframe.h
+19
-0
sch_screen.cpp
eeschema/sch_screen.cpp
+3
-1
dialog_mask_clearance.cpp
pcbnew/dialogs/dialog_mask_clearance.cpp
+25
-8
pcbnew.cpp
pcbnew/pcbnew.cpp
+4
-2
No files found.
bitmap2component/bitmap2cmp_gui_base.fbp
View file @
ed5585eb
This source diff could not be displayed because it is too large. You can
view the blob
instead.
common/basicframe.cpp
View file @
ed5585eb
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
#include <appl_wxstruct.h>
#include <appl_wxstruct.h>
#include <online_help.h>
#include <online_help.h>
#include <id.h>
#include <id.h>
#include <confirm.h>
#include <eda_doc.h>
#include <eda_doc.h>
#include <wxstruct.h>
#include <wxstruct.h>
#include <macros.h>
#include <macros.h>
...
@@ -310,7 +309,7 @@ wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type,
...
@@ -310,7 +309,7 @@ wxString EDA_BASE_FRAME::GetFileFromHistory( int cmdId, const wxString& type,
if
(
!
wxFileName
::
FileExists
(
fn
)
)
if
(
!
wxFileName
::
FileExists
(
fn
)
)
{
{
msg
=
type
+
_
(
" file <"
)
+
fn
+
_
(
"> was not found."
);
msg
=
type
+
_
(
" file <"
)
+
fn
+
_
(
"> was not found."
);
DisplayError
(
this
,
msg
);
wxMessageBox
(
msg
);
fileHistory
->
RemoveFileFromHistory
(
i
);
fileHistory
->
RemoveFileFromHistory
(
i
);
fn
=
wxEmptyString
;
fn
=
wxEmptyString
;
}
}
...
@@ -349,7 +348,7 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
...
@@ -349,7 +348,7 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
{
{
msg
.
Printf
(
_
(
"Help file %s could not be found."
),
msg
.
Printf
(
_
(
"Help file %s could not be found."
),
GetChars
(
wxGetApp
().
GetHelpFileName
()
)
);
GetChars
(
wxGetApp
().
GetHelpFileName
()
)
);
DisplayError
(
this
,
msg
);
wxMessageBox
(
msg
);
}
}
else
else
{
{
...
@@ -376,7 +375,7 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
...
@@ -376,7 +375,7 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
else
else
{
{
msg
.
Printf
(
_
(
"Help file %s not found."
),
GetChars
(
wxGetApp
().
GetHelpFileName
()
)
);
msg
.
Printf
(
_
(
"Help file %s not found."
),
GetChars
(
wxGetApp
().
GetHelpFileName
()
)
);
DisplayError
(
this
,
msg
);
wxMessageBox
(
msg
);
}
}
#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF
#elif defined ONLINE_HELP_FILES_FORMAT_IS_PDF
...
@@ -386,7 +385,7 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
...
@@ -386,7 +385,7 @@ void EDA_BASE_FRAME::GetKicadHelp( wxCommandEvent& event )
{
{
msg
.
Printf
(
_
(
"Help file %s could not be found."
),
msg
.
Printf
(
_
(
"Help file %s could not be found."
),
GetChars
(
wxGetApp
().
GetHelpFileName
()
)
);
GetChars
(
wxGetApp
().
GetHelpFileName
()
)
);
DisplayError
(
this
,
msg
);
wxMessageBox
(
msg
);
}
}
else
else
{
{
...
@@ -589,7 +588,7 @@ bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName )
...
@@ -589,7 +588,7 @@ bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName )
if
(
!
msg
.
IsEmpty
()
)
if
(
!
msg
.
IsEmpty
()
)
{
{
DisplayError
(
this
,
msg
);
wxMessageBox
(
msg
);
return
false
;
return
false
;
}
}
...
@@ -643,7 +642,7 @@ edits you made?" ),
...
@@ -643,7 +642,7 @@ edits you made?" ),
if
(
!
wxRenameFile
(
aFileName
.
GetFullPath
(),
backupFileName
.
GetFullPath
()
)
)
if
(
!
wxRenameFile
(
aFileName
.
GetFullPath
(),
backupFileName
.
GetFullPath
()
)
)
{
{
msg
=
_
(
"Could not create backup file "
)
+
backupFileName
.
GetFullPath
();
msg
=
_
(
"Could not create backup file "
)
+
backupFileName
.
GetFullPath
();
DisplayError
(
this
,
msg
);
wxMessageBox
(
msg
);
}
}
}
}
...
...
demos/CMakeLists.txt
View file @
ed5585eb
install
(
DIRECTORY complex_hierarchy ecc83 electric flat_hierarchy interf_u microwave
install
(
DIRECTORY complex_hierarchy ecc83 electric flat_hierarchy
kit-dev-coldfire-xilinx_5213 interf_u microwave
pic_programmer pspice
"sonde xilinx"
test_xil_95108 video
pic_programmer pspice
"sonde xilinx"
test_xil_95108 video
DESTINATION
${
KICAD_DEMOS
}
DESTINATION
${
KICAD_DEMOS
}
COMPONENT resources
COMPONENT resources
...
...
eeschema/dialogs/dialog_SVG_print.cpp
View file @
ed5585eb
...
@@ -228,7 +228,13 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
...
@@ -228,7 +228,13 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
wxSize
(
0x7FFFFF0
,
0x7FFFFF0
)
)
);
wxSize
(
0x7FFFFF0
,
0x7FFFFF0
)
)
);
screen
->
m_IsPrinting
=
true
;
screen
->
m_IsPrinting
=
true
;
screen
->
Draw
(
panel
,
&
dc
,
GR_COPY
);
if
(
frame
->
IsType
(
SCHEMATIC_FRAME
)
)
screen
->
Draw
(
panel
,
&
dc
,
GR_COPY
);
if
(
frame
->
IsType
(
LIBEDITOR_FRAME
)
)
((
LIB_EDIT_FRAME
*
)
frame
)
->
RedrawComponent
(
&
dc
,
wxPoint
(
sheetSize
.
x
/
2
,
sheetSize
.
y
/
2
)
);
if
(
aPrint_Sheet_Ref
)
if
(
aPrint_Sheet_Ref
)
frame
->
TraceWorkSheet
(
&
dc
,
screen
,
g_DrawDefaultLineThickness
);
frame
->
TraceWorkSheet
(
&
dc
,
screen
,
g_DrawDefaultLineThickness
);
...
...
eeschema/libedit.cpp
View file @
ed5585eb
...
@@ -250,13 +250,8 @@ bool LIB_EDIT_FRAME::LoadOneLibraryPartAux( LIB_ALIAS* aEntry, CMP_LIBRARY* aLib
...
@@ -250,13 +250,8 @@ bool LIB_EDIT_FRAME::LoadOneLibraryPartAux( LIB_ALIAS* aEntry, CMP_LIBRARY* aLib
}
}
void
LIB_EDIT_FRAME
::
Redraw
ActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
void
LIB_EDIT_FRAME
::
Redraw
Component
(
wxDC
*
aDC
,
wxPoint
aOffset
)
{
{
if
(
GetScreen
()
==
NULL
)
return
;
m_canvas
->
DrawBackGround
(
DC
);
if
(
m_component
)
if
(
m_component
)
{
{
// display reference like in schematic (a reference U is shown U? or U?A)
// display reference like in schematic (a reference U is shown U? or U?A)
...
@@ -266,10 +261,20 @@ void LIB_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
...
@@ -266,10 +261,20 @@ void LIB_EDIT_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
wxString
fieldText
=
Field
->
m_Text
;
wxString
fieldText
=
Field
->
m_Text
;
wxString
fieldfullText
=
Field
->
GetFullText
(
m_unit
);
wxString
fieldfullText
=
Field
->
GetFullText
(
m_unit
);
Field
->
m_Text
=
fieldfullText
;
Field
->
m_Text
=
fieldfullText
;
m_component
->
Draw
(
m_canvas
,
DC
,
wxPoint
(
0
,
0
)
,
m_unit
,
m_component
->
Draw
(
m_canvas
,
aDC
,
aOffset
,
m_unit
,
m_convert
,
GR_DEFAULT_DRAWMODE
);
m_convert
,
GR_DEFAULT_DRAWMODE
);
Field
->
m_Text
=
fieldText
;
Field
->
m_Text
=
fieldText
;
}
}
}
void
LIB_EDIT_FRAME
::
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
{
if
(
GetScreen
()
==
NULL
)
return
;
m_canvas
->
DrawBackGround
(
DC
);
RedrawComponent
(
DC
,
wxPoint
(
0
,
0
)
);
if
(
m_canvas
->
IsMouseCaptured
()
)
if
(
m_canvas
->
IsMouseCaptured
()
)
m_canvas
->
CallMouseCapture
(
DC
,
wxDefaultPosition
,
false
);
m_canvas
->
CallMouseCapture
(
DC
,
wxDefaultPosition
,
false
);
...
...
eeschema/libedit_plot_component.cpp
View file @
ed5585eb
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include <general.h>
#include <general.h>
#include <libeditframe.h>
#include <libeditframe.h>
#include <class_library.h>
#include <class_library.h>
#include <dialogs/dialog_SVG_print.h>
void
LIB_EDIT_FRAME
::
OnPlotCurrentComponent
(
wxCommandEvent
&
event
)
void
LIB_EDIT_FRAME
::
OnPlotCurrentComponent
(
wxCommandEvent
&
event
)
...
@@ -128,6 +129,11 @@ void LIB_EDIT_FRAME::CreatePNGorJPEGFile( const wxString& aFileName, bool aFmt_j
...
@@ -128,6 +129,11 @@ void LIB_EDIT_FRAME::CreatePNGorJPEGFile( const wxString& aFileName, bool aFmt_j
}
}
void
LIB_EDIT_FRAME
::
SVG_Print_Component
(
const
wxString
&
FullFileName
)
{
DIALOG_SVG_PRINT
::
DrawSVGPage
(
this
,
FullFileName
,
GetScreen
()
);
}
void
LIB_EDIT_FRAME
::
PrintPage
(
wxDC
*
aDC
,
int
aPrintMask
,
bool
aPrintMirrorMode
,
void
*
aData
)
void
LIB_EDIT_FRAME
::
PrintPage
(
wxDC
*
aDC
,
int
aPrintMask
,
bool
aPrintMirrorMode
,
void
*
aData
)
{
{
if
(
!
m_component
)
if
(
!
m_component
)
...
...
eeschema/libeditframe.cpp
View file @
ed5585eb
...
@@ -47,7 +47,6 @@
...
@@ -47,7 +47,6 @@
#include <hotkeys.h>
#include <hotkeys.h>
#include <dialogs/dialog_lib_edit_text.h>
#include <dialogs/dialog_lib_edit_text.h>
#include <dialogs/dialog_SVG_print.h>
#include <dialogs/dialog_edit_component_in_lib.h>
#include <dialogs/dialog_edit_component_in_lib.h>
#include <dialogs/dialog_libedit_dimensions.h>
#include <dialogs/dialog_libedit_dimensions.h>
...
@@ -926,11 +925,6 @@ void LIB_EDIT_FRAME::ClearTempCopyComponent()
...
@@ -926,11 +925,6 @@ void LIB_EDIT_FRAME::ClearTempCopyComponent()
}
}
void
LIB_EDIT_FRAME
::
SVG_Print_Component
(
const
wxString
&
FullFileName
)
{
DIALOG_SVG_PRINT
::
DrawSVGPage
(
this
,
FullFileName
,
GetScreen
()
);
}
void
LIB_EDIT_FRAME
::
EditSymbolText
(
wxDC
*
DC
,
LIB_ITEM
*
DrawItem
)
void
LIB_EDIT_FRAME
::
EditSymbolText
(
wxDC
*
DC
,
LIB_ITEM
*
DrawItem
)
{
{
...
...
eeschema/libeditframe.h
View file @
ed5585eb
...
@@ -247,7 +247,26 @@ public:
...
@@ -247,7 +247,26 @@ public:
*/
*/
void
DisplayLibInfos
();
void
DisplayLibInfos
();
/**
* Function RedrawComponent
* Redraw the current component loaded in library editor
* Display reference like in schematic (a reference U is shown U? or U?A)
* accordint to the current selected unit and De Morgan selection
* although it is stored without ? and part id.
* @param aDC = the current device context
* @param aOffset = a draw offset. usually à,0 to draw on the screen, but
* can be set to page size / 2 to draw or print in SVG format.
*/
void
RedrawComponent
(
wxDC
*
aDC
,
wxPoint
aOffset
);
/**
* Function RedrawActiveWindow
* Redraw the current component loaded in library editor, an axes
* Display reference like in schematic (a reference U is shown U? or U?A)
* update status bar and info shown in the bottom of the window
*/
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
);
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
);
void
OnCloseWindow
(
wxCloseEvent
&
Event
);
void
OnCloseWindow
(
wxCloseEvent
&
Event
);
void
ReCreateHToolbar
();
void
ReCreateHToolbar
();
void
ReCreateVToolbar
();
void
ReCreateVToolbar
();
...
...
eeschema/sch_screen.cpp
View file @
ed5585eb
...
@@ -530,7 +530,9 @@ bool SCH_SCREEN::Save( FILE* aFile ) const
...
@@ -530,7 +530,9 @@ bool SCH_SCREEN::Save( FILE* aFile ) const
return
true
;
return
true
;
}
}
// note: SCH_SCREEN::Draw is useful only for schematic.
// library editor and library viewer do not use a draw list, and therefore
// SCH_SCREEN::Draw draws nothing
void
SCH_SCREEN
::
Draw
(
EDA_DRAW_PANEL
*
aCanvas
,
wxDC
*
aDC
,
int
aDrawMode
,
int
aColor
)
void
SCH_SCREEN
::
Draw
(
EDA_DRAW_PANEL
*
aCanvas
,
wxDC
*
aDC
,
int
aDrawMode
,
int
aColor
)
{
{
for
(
SCH_ITEM
*
item
=
m_drawList
.
begin
();
item
!=
NULL
;
item
=
item
->
Next
()
)
for
(
SCH_ITEM
*
item
=
m_drawList
.
begin
();
item
!=
NULL
;
item
=
item
->
Next
()
)
...
...
pcbnew/dialogs/dialog_mask_clearance.cpp
View file @
ed5585eb
// ///////////////////////////////////////////////////////////////////////////
/*
// Name: dialog_mask_clearance.cpp
* This program source code file is part of KiCad, a free EDA CAD application.
// Author: jean-pierre Charras
*
// Modified by:
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
// Created: 17 feb 2009
*
// Licence: GPL
* This program is free software; you can redistribute it and/or
// ///////////////////////////////////////////////////////////////////////////
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file dialog_mask_clearance.cpp
*/
#include <fctsys.h>
#include <fctsys.h>
#include <confirm.h>
#include <pcbnew.h>
#include <pcbnew.h>
#include <wxPcbStruct.h>
#include <wxPcbStruct.h>
#include <class_board_design_settings.h>
#include <class_board_design_settings.h>
...
...
pcbnew/pcbnew.cpp
View file @
ed5585eb
...
@@ -155,6 +155,10 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
...
@@ -155,6 +155,10 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
frame
->
Zoom_Automatique
(
true
);
frame
->
Zoom_Automatique
(
true
);
// Load config and default values before loading a board file
// Some will be overwritten after loading the board file
frame
->
LoadProjectSettings
(
fn
.
GetFullPath
()
);
/* Load file specified in the command line. */
/* Load file specified in the command line. */
if
(
fn
.
IsOk
()
)
if
(
fn
.
IsOk
()
)
{
{
...
@@ -180,8 +184,6 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
...
@@ -180,8 +184,6 @@ Changing extension to .brd." ), GetChars( fn.GetFullPath() ) );
}
}
}
}
frame
->
LoadProjectSettings
(
fn
.
GetFullPath
()
);
// update the layer names in the listbox
// update the layer names in the listbox
frame
->
ReCreateLayerBox
(
NULL
);
frame
->
ReCreateLayerBox
(
NULL
);
...
...
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