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
1d2ca601
Commit
1d2ca601
authored
Jan 21, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gerbview: fix printing issue.
Minor others fixes and enhancements
parent
6be7640c
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
246 additions
and
106 deletions
+246
-106
edit_component_in_schematic.cpp
eeschema/edit_component_in_schematic.cpp
+5
-4
dialog_print_using_printer.cpp
gerbview/dialogs/dialog_print_using_printer.cpp
+4
-4
dialog_print_using_printer_base.cpp
gerbview/dialogs/dialog_print_using_printer_base.cpp
+0
-6
dialog_print_using_printer_base.fbp
gerbview/dialogs/dialog_print_using_printer_base.fbp
+0
-59
dialog_print_using_printer_base.h
gerbview/dialogs/dialog_print_using_printer_base.h
+0
-2
draw_gerber_screen.cpp
gerbview/draw_gerber_screen.cpp
+1
-1
dialog_design_rules.cpp
pcbnew/dialogs/dialog_design_rules.cpp
+17
-4
dialog_design_rules_base.cpp
pcbnew/dialogs/dialog_design_rules_base.cpp
+6
-5
dialog_design_rules_base.fbp
pcbnew/dialogs/dialog_design_rules_base.fbp
+194
-5
dialog_design_rules_base.h
pcbnew/dialogs/dialog_design_rules_base.h
+15
-14
print_board_functions.cpp
pcbnew/print_board_functions.cpp
+4
-2
No files found.
eeschema/edit_component_in_schematic.cpp
View file @
1d2ca601
...
...
@@ -76,9 +76,9 @@ void SCH_EDIT_FRAME::StartMoveCmpField( SCH_FIELD* aField, wxDC* DC )
}
/*
*****************************************************************************/
/* Edit the field Field (text, size) */
/*****************************************************************************
*/
/*
* Edit a field: text and size
*/
void
SCH_EDIT_FRAME
::
EditCmpFieldText
(
SCH_FIELD
*
Field
,
wxDC
*
DC
)
{
int
fieldNdx
,
flag
;
...
...
@@ -125,7 +125,8 @@ modified!\nYou must create a new power" ) );
wxString
newtext
=
Field
->
m_Text
;
DrawPanel
->
m_IgnoreMouseEvents
=
TRUE
;
wxTextEntryDialog
dlg
(
this
,
Field
->
m_Name
,
_
(
"Component field text"
),
newtext
);
wxString
title
=
_
(
"Field:"
)
+
wxT
(
" "
)
+
Field
->
m_Name
;
wxTextEntryDialog
dlg
(
this
,
wxEmptyString
,
title
,
newtext
);
int
diag
=
dlg
.
ShowModal
();
newtext
=
dlg
.
GetValue
(
);
newtext
.
Trim
(
true
);
...
...
gerbview/dialogs/dialog_print_using_printer.cpp
View file @
1d2ca601
...
...
@@ -70,7 +70,7 @@ private:
public
:
bool
IsMirrored
()
{
return
m_Print_Mirror
->
IsChecked
();
}
bool
PrintUsingSinglePage
()
{
return
m_PagesOption
->
GetSelection
()
;
}
bool
PrintUsingSinglePage
()
{
return
true
;
}
int
SetLayerMaskFromListSelection
();
};
...
...
@@ -314,9 +314,9 @@ void DIALOG_PRINT_USING_PRINTER::SetPrintParameters( )
s_Parameters
.
m_Print_Black_and_White
=
m_ModeColorOption
->
GetSelection
()
!=
0
;
if
(
m_PagesOption
)
s_Parameters
.
m_OptionPrintPage
=
m_PagesOption
->
GetSelection
()
!=
0
;
// Due to negative objects in gerber objects, always use one page per image,
// because these objects create artefact when they are printed on an existing image.
s_Parameters
.
m_OptionPrintPage
=
false
;
SetLayerMaskFromListSelection
();
...
...
gerbview/dialogs/dialog_print_using_printer_base.cpp
View file @
1d2ca601
...
...
@@ -82,12 +82,6 @@ DIALOG_PRINT_USING_PRINTER_base::DIALOG_PRINT_USING_PRINTER_base( wxWindow* pare
bmiddleRightSizer
->
Add
(
m_ModeColorOption
,
0
,
wxALL
|
wxEXPAND
,
5
);
wxString
m_PagesOptionChoices
[]
=
{
_
(
"1 Page per Layer"
),
_
(
"Single page"
)
};
int
m_PagesOptionNChoices
=
sizeof
(
m_PagesOptionChoices
)
/
sizeof
(
wxString
);
m_PagesOption
=
new
wxRadioBox
(
this
,
wxID_PAGE_MODE
,
_
(
"Page Print"
),
wxDefaultPosition
,
wxDefaultSize
,
m_PagesOptionNChoices
,
m_PagesOptionChoices
,
1
,
wxRA_SPECIFY_COLS
);
m_PagesOption
->
SetSelection
(
0
);
bmiddleRightSizer
->
Add
(
m_PagesOption
,
0
,
wxALL
|
wxEXPAND
,
5
);
bMainSizer
->
Add
(
bmiddleRightSizer
,
0
,
wxEXPAND
,
5
);
wxBoxSizer
*
b_buttonsSizer
;
...
...
gerbview/dialogs/dialog_print_using_printer_base.fbp
View file @
1d2ca601
...
...
@@ -578,65 +578,6 @@
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxRadioBox"
expanded=
"1"
>
<property
name=
"bg"
></property>
<property
name=
"choices"
>
"
1 Page per Layer
"
"
Single page
"
</property>
<property
name=
"context_help"
></property>
<property
name=
"context_menu"
>
1
</property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"font"
></property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_PAGE_MODE
</property>
<property
name=
"label"
>
Page Print
</property>
<property
name=
"majorDimension"
>
1
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_PagesOption
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"selection"
>
0
</property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxRA_SPECIFY_COLS
</property>
<property
name=
"subclass"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"validator_data_type"
></property>
<property
name=
"validator_style"
>
wxFILTER_NONE
</property>
<property
name=
"validator_type"
>
wxDefaultValidator
</property>
<property
name=
"validator_variable"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
<event
name=
"OnMiddleUp"
></event>
<event
name=
"OnMotion"
></event>
<event
name=
"OnMouseEvents"
></event>
<event
name=
"OnMouseWheel"
></event>
<event
name=
"OnPaint"
></event>
<event
name=
"OnRadioBox"
></event>
<event
name=
"OnRightDClick"
></event>
<event
name=
"OnRightDown"
></event>
<event
name=
"OnRightUp"
></event>
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
...
...
gerbview/dialogs/dialog_print_using_printer_base.h
View file @
1d2ca601
...
...
@@ -37,7 +37,6 @@ class DIALOG_PRINT_USING_PRINTER_base : public wxDialog
enum
{
wxID_PRINT_MODE
=
1000
,
wxID_PAGE_MODE
,
wxID_PRINT_OPTIONS
,
wxID_PRINT_ALL
,
};
...
...
@@ -51,7 +50,6 @@ class DIALOG_PRINT_USING_PRINTER_base : public wxDialog
wxTextCtrl
*
m_FineAdjustYscaleOpt
;
wxCheckBox
*
m_Print_Mirror
;
wxRadioBox
*
m_ModeColorOption
;
wxRadioBox
*
m_PagesOption
;
wxButton
*
m_buttonOption
;
wxButton
*
m_buttonPreview
;
wxButton
*
m_buttonPrint
;
...
...
gerbview/draw_gerber_screen.cpp
View file @
1d2ca601
...
...
@@ -53,7 +53,7 @@ void WinEDA_GerberFrame::PrintPage( wxDC* aDC, int aPrintMasklayer,
DrawPanel
->
m_PrintIsMirrored
=
aPrintMirrorMode
;
GetBoard
()
->
Draw
(
DrawPanel
,
aDC
,
GR_COPY
,
wxPoint
(
0
,
0
)
);
GetBoard
()
->
Draw
(
DrawPanel
,
aDC
,
-
1
,
wxPoint
(
0
,
0
)
);
DrawPanel
->
m_PrintIsMirrored
=
false
;
...
...
pcbnew/dialogs/dialog_design_rules.cpp
View file @
1d2ca601
...
...
@@ -322,6 +322,23 @@ void DIALOG_DESIGN_RULES::InitDimensionsLists()
wxString
msg
;
int
Internal_Unit
=
m_Parent
->
m_InternalUnits
;
// Compute the column widths here, after setting texts
msg
=
wxT
(
"000000.000000"
);
// This is a very long text to display values.
// Actual values are shorter.
m_gridViaSizeList
->
SetCellValue
(
0
,
0
,
msg
);
m_gridViaSizeList
->
SetCellValue
(
0
,
1
,
msg
);
m_gridTrackWidthList
->
SetCellValue
(
0
,
0
,
msg
);
m_gridViaSizeList
->
SetColMinimalWidth
(
0
,
150
);
m_gridViaSizeList
->
SetColMinimalWidth
(
1
,
150
);
m_gridViaSizeList
->
AutoSizeColumns
(
true
);
m_gridTrackWidthList
->
SetColMinimalWidth
(
0
,
150
);
m_gridTrackWidthList
->
AutoSizeColumns
(
true
);
// Fill cells with actual values:
m_gridViaSizeList
->
SetCellValue
(
0
,
0
,
wxEmptyString
);
m_gridViaSizeList
->
SetCellValue
(
0
,
1
,
wxEmptyString
);
m_gridTrackWidthList
->
SetCellValue
(
0
,
0
,
wxEmptyString
);
for
(
unsigned
ii
=
0
;
ii
<
m_TracksWidthList
.
size
();
ii
++
)
{
msg
=
ReturnStringFromValue
(
g_UserUnit
,
m_TracksWidthList
[
ii
],
Internal_Unit
,
false
);
...
...
@@ -340,10 +357,6 @@ void DIALOG_DESIGN_RULES::InitDimensionsLists()
m_gridViaSizeList
->
SetCellValue
(
ii
,
1
,
msg
);
}
}
// recompute the column widths here, after setting texts
m_gridViaSizeList
->
SetColumnWidth
(
0
,
wxLIST_AUTOSIZE
);
m_gridTrackWidthList
->
SetColumnWidth
(
0
,
wxLIST_AUTOSIZE
);
}
...
...
pcbnew/dialogs/dialog_design_rules_base.cpp
View file @
1d2ca601
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 16 2008
)
// C++ code generated with wxFormBuilder (version
Sep 8 2010
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -153,7 +153,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_panelNetClassesEditor
->
SetSizer
(
bpanelNetClassesSizer
);
m_panelNetClassesEditor
->
Layout
();
bpanelNetClassesSizer
->
Fit
(
m_panelNetClassesEditor
);
m_DRnotebook
->
AddPage
(
m_panelNetClassesEditor
,
_
(
"Net Classes Editor"
),
tru
e
);
m_DRnotebook
->
AddPage
(
m_panelNetClassesEditor
,
_
(
"Net Classes Editor"
),
fals
e
);
m_panelGolbalDesignRules
=
new
wxPanel
(
m_DRnotebook
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxSUNKEN_BORDER
|
wxTAB_TRAVERSAL
);
wxBoxSizer
*
bpanelGlobRulesSizer
;
bpanelGlobRulesSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
...
...
@@ -305,7 +305,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
// Cell Defaults
m_gridViaSizeList
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
sViaSizeBox
->
Add
(
m_gridViaSizeList
,
0
,
wxALL
,
5
);
sViaSizeBox
->
Add
(
m_gridViaSizeList
,
0
,
wxALL
|
wxEXPAND
,
5
);
bDesignRulesLowerSizer
->
Add
(
sViaSizeBox
,
1
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
|
wxEXPAND
,
5
);
...
...
@@ -348,7 +348,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
// Cell Defaults
m_gridTrackWidthList
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
sbTracksListSizer
->
Add
(
m_gridTrackWidthList
,
0
,
wxALL
,
5
);
sbTracksListSizer
->
Add
(
m_gridTrackWidthList
,
0
,
wxALL
|
wxEXPAND
,
5
);
bDesignRulesLowerSizer
->
Add
(
sbTracksListSizer
,
1
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
|
wxEXPAND
,
5
);
...
...
@@ -357,7 +357,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_panelGolbalDesignRules
->
SetSizer
(
bpanelGlobRulesSizer
);
m_panelGolbalDesignRules
->
Layout
();
bpanelGlobRulesSizer
->
Fit
(
m_panelGolbalDesignRules
);
m_DRnotebook
->
AddPage
(
m_panelGolbalDesignRules
,
_
(
"Global Design Rules"
),
fals
e
);
m_DRnotebook
->
AddPage
(
m_panelGolbalDesignRules
,
_
(
"Global Design Rules"
),
tru
e
);
bMainSizer
->
Add
(
m_DRnotebook
,
1
,
wxEXPAND
|
wxRIGHT
|
wxLEFT
,
5
);
...
...
@@ -418,4 +418,5 @@ DIALOG_DESIGN_RULES_BASE::~DIALOG_DESIGN_RULES_BASE()
m_rightClassChoice
->
Disconnect
(
wxEVT_COMMAND_CHOICE_SELECTED
,
wxCommandEventHandler
(
DIALOG_DESIGN_RULES_BASE
::
OnRightCBSelection
),
NULL
,
this
);
m_buttonOk
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_DESIGN_RULES_BASE
::
OnOkButtonClick
),
NULL
,
this
);
m_buttonCancel
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_DESIGN_RULES_BASE
::
OnCancelButtonClick
),
NULL
,
this
);
}
pcbnew/dialogs/dialog_design_rules_base.fbp
View file @
1d2ca601
This diff is collapsed.
Click to expand it.
pcbnew/dialogs/dialog_design_rules_base.h
View file @
1d2ca601
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 16 2008
)
// C++ code generated with wxFormBuilder (version
Sep 8 2010
)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -93,22 +93,23 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
wxButton
*
m_buttonCancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnNetClassesNameLeftClick
(
wxGridEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnNetClassesNameRightClick
(
wxGridEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnAddNetclassClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnRemoveNetclassClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnMoveUpSelectedNetClass
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnLeftCBSelection
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnRightToLeftCopyButton
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnLeftToRightCopyButton
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnLeftSelectAllButton
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnRightSelectAllButton
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnRightCBSelection
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnOkButtonClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnCancelButtonClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnNetClassesNameLeftClick
(
wxGridEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnNetClassesNameRightClick
(
wxGridEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnAddNetclassClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnRemoveNetclassClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnMoveUpSelectedNetClass
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnLeftCBSelection
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnRightToLeftCopyButton
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnLeftToRightCopyButton
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnLeftSelectAllButton
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnRightSelectAllButton
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnRightCBSelection
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnOkButtonClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
OnCancelButtonClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
public
:
DIALOG_DESIGN_RULES_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"Design Rules Editor"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
777
,
640
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_DESIGN_RULES_BASE
();
...
...
pcbnew/print_board_functions.cpp
View file @
1d2ca601
...
...
@@ -184,8 +184,8 @@ void WinEDA_PcbFrame::PrintPage( wxDC* aDC,
bool
nctmp
=
GetBoard
()
->
IsElementVisible
(
NO_CONNECTS_VISIBLE
);
GetBoard
()
->
SetElementVisibility
(
NO_CONNECTS_VISIBLE
,
false
);
DisplayOpt
.
DisplayPadIsol
=
false
;
DisplayOpt
.
DisplayModEdge
=
FILLED
;
DisplayOpt
.
DisplayModText
=
FILLED
;
m_DisplayModEdge
=
DisplayOpt
.
DisplayModEdge
=
FILLED
;
m_DisplayModText
=
DisplayOpt
.
DisplayModText
=
FILLED
;
m_DisplayPcbTrackFill
=
DisplayOpt
.
DisplayPcbTrackFill
=
FILLED
;
DisplayOpt
.
ShowTrackClearanceMode
=
DO_NOT_SHOW_CLEARANCE
;
DisplayOpt
.
DisplayDrawItems
=
FILLED
;
...
...
@@ -311,6 +311,8 @@ void WinEDA_PcbFrame::PrintPage( wxDC* aDC,
m_DisplayPadFill
=
DisplayOpt
.
DisplayPadFill
;
m_DisplayViaFill
=
DisplayOpt
.
DisplayViaFill
;
m_DisplayPadNum
=
DisplayOpt
.
DisplayPadNum
;
m_DisplayModEdge
=
DisplayOpt
.
DisplayModEdge
;
m_DisplayModText
=
DisplayOpt
.
DisplayModText
;
GetBoard
()
->
SetElementVisibility
(
NO_CONNECTS_VISIBLE
,
nctmp
);
}
...
...
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