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
c2ea4a0a
Commit
c2ea4a0a
authored
Dec 19, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleaning
parent
96849d5a
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
47 additions
and
87 deletions
+47
-87
drawframe.cpp
common/drawframe.cpp
+0
-9
zoom.cpp
common/zoom.cpp
+12
-16
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+1
-3
wxPcbStruct.h
include/wxPcbStruct.h
+1
-3
wxstruct.h
include/wxstruct.h
+0
-1
dialog_general_options.cpp
pcbnew/dialog_general_options.cpp
+4
-7
dialog_general_options.h
pcbnew/dialog_general_options.h
+1
-2
dialog_pad_properties.cpp
pcbnew/dialog_pad_properties.cpp
+13
-24
edit.cpp
pcbnew/edit.cpp
+1
-1
files.cpp
pcbnew/files.cpp
+1
-1
globaleditpad.cpp
pcbnew/globaleditpad.cpp
+1
-5
modedit.cpp
pcbnew/modedit.cpp
+4
-5
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+1
-2
onleftclick.cpp
pcbnew/onleftclick.cpp
+1
-1
pcbframe.cpp
pcbnew/pcbframe.cpp
+1
-0
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+3
-5
tool_onrightclick.cpp
pcbnew/tool_onrightclick.cpp
+2
-2
No files found.
common/drawframe.cpp
View file @
c2ea4a0a
...
@@ -335,15 +335,6 @@ void WinEDA_DrawFrame::DisplayUnitsMsg()
...
@@ -335,15 +335,6 @@ void WinEDA_DrawFrame::DisplayUnitsMsg()
}
}
void
WinEDA_DrawFrame
::
ReDrawPanel
()
{
if
(
DrawPanel
==
NULL
)
return
;
KicadGraphicContext
dc
(
DrawPanel
);
DrawPanel
->
ReDraw
(
&
dc
);
}
/* Recalculate the size of toolbars and display panel.
/* Recalculate the size of toolbars and display panel.
*/
*/
...
...
common/zoom.cpp
View file @
c2ea4a0a
...
@@ -27,7 +27,8 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
...
@@ -27,7 +27,8 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
{
{
PutOnGrid
(
&
(
GetBaseScreen
()
->
m_Curseur
)
);
PutOnGrid
(
&
(
GetBaseScreen
()
->
m_Curseur
)
);
AdjustScrollBars
();
AdjustScrollBars
();
ReDrawPanel
();
KicadGraphicContext
dc
(
DrawPanel
);
DrawPanel
->
ReDraw
(
&
dc
);
/* Move the mouse cursor to the on grid graphic cursor position */
/* Move the mouse cursor to the on grid graphic cursor position */
if
(
ToMouse
==
TRUE
)
if
(
ToMouse
==
TRUE
)
...
@@ -55,12 +56,13 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* coord )
...
@@ -55,12 +56,13 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* coord )
}
}
/** Redraw the screen with the zoom level which shows all the page or the board
/** Redraw the screen with best zoom level and the best centering
* that shows all the page or the board
*/
*/
void
WinEDA_DrawFrame
::
Zoom_Automatique
(
bool
move_mouse_cursor
)
void
WinEDA_DrawFrame
::
Zoom_Automatique
(
bool
move_mouse_cursor
)
{
{
if
(
GetBaseScreen
()
->
SetZoom
(
BestZoom
()
)
)
GetBaseScreen
()
->
SetZoom
(
BestZoom
()
);
// Set the best zoom
Recadre_Trace
(
move_mouse_cursor
);
Recadre_Trace
(
move_mouse_cursor
);
// Set the best centering and refresh the screen
}
}
...
@@ -93,11 +95,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
...
@@ -93,11 +95,7 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
void
WinEDA_DrawFrame
::
OnZoom
(
wxCommandEvent
&
event
)
void
WinEDA_DrawFrame
::
OnZoom
(
wxCommandEvent
&
event
)
{
{
if
(
DrawPanel
==
NULL
)
if
(
DrawPanel
==
NULL
)
{
wxLogDebug
(
wxT
(
"%s, %d: DrawPanel object is undefined ."
),
__TFILE__
,
__LINE__
);
return
;
return
;
}
int
i
;
int
i
;
int
id
=
event
.
GetId
();
int
id
=
event
.
GetId
();
...
@@ -131,7 +129,10 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event )
...
@@ -131,7 +129,10 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event )
case
ID_ZOOM_REDRAW
:
case
ID_ZOOM_REDRAW
:
// DrawPanel->Refresh(); usually good,
// DrawPanel->Refresh(); usually good,
// but does not work under linux, when called from here (wxGTK bug ?)
// but does not work under linux, when called from here (wxGTK bug ?)
ReDrawPanel
();
{
KicadGraphicContext
dc
(
DrawPanel
);
DrawPanel
->
ReDraw
(
&
dc
);
}
break
;
break
;
case
ID_POPUP_ZOOM_CENTER
:
case
ID_POPUP_ZOOM_CENTER
:
...
@@ -139,12 +140,7 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event )
...
@@ -139,12 +140,7 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event )
break
;
break
;
case
ID_ZOOM_PAGE
:
case
ID_ZOOM_PAGE
:
// With Zoom_Automatique(), the "Zoom Auto" button (and hotkey)
Zoom_Automatique
(
false
);
// does nothing if the view is already at the correct
// zoom level, but needs to be shifted (centered).
//Zoom_Automatique( false );
GetBaseScreen
()
->
SetZoom
(
BestZoom
()
);
Recadre_Trace
(
false
);
break
;
break
;
case
ID_POPUP_ZOOM_SELECT
:
case
ID_POPUP_ZOOM_SELECT
:
...
...
include/wxBasePcbFrame.h
View file @
c2ea4a0a
...
@@ -236,9 +236,7 @@ public:
...
@@ -236,9 +236,7 @@ public:
wxDC
*
DC
);
wxDC
*
DC
);
TEXTE_MODULE
*
CreateTextModule
(
MODULE
*
Module
,
wxDC
*
DC
);
TEXTE_MODULE
*
CreateTextModule
(
MODULE
*
Module
,
wxDC
*
DC
);
void
InstallPadOptionsFrame
(
D_PAD
*
pad
,
void
InstallPadOptionsFrame
(
D_PAD
*
pad
);
wxDC
*
DC
,
const
wxPoint
&
pos
);
void
InstallTextModOptionsFrame
(
TEXTE_MODULE
*
TextMod
,
void
InstallTextModOptionsFrame
(
TEXTE_MODULE
*
TextMod
,
wxDC
*
DC
);
wxDC
*
DC
);
...
...
include/wxPcbStruct.h
View file @
c2ea4a0a
...
@@ -298,9 +298,7 @@ public:
...
@@ -298,9 +298,7 @@ public:
void
SetToolbars
();
void
SetToolbars
();
void
Process_Settings
(
wxCommandEvent
&
event
);
void
Process_Settings
(
wxCommandEvent
&
event
);
void
InstallPcbOptionsFrame
(
const
wxPoint
&
pos
,
void
InstallPcbOptionsFrame
(
int
id
);
wxDC
*
DC
,
int
id
);
void
InstallDisplayOptionsDialog
(
wxCommandEvent
&
aEvent
);
void
InstallDisplayOptionsDialog
(
wxCommandEvent
&
aEvent
);
void
InstallPcbGlobalDeleteFrame
(
const
wxPoint
&
pos
);
void
InstallPcbGlobalDeleteFrame
(
const
wxPoint
&
pos
);
...
...
include/wxstruct.h
View file @
c2ea4a0a
...
@@ -273,7 +273,6 @@ public:
...
@@ -273,7 +273,6 @@ public:
void
SVG_Print
(
wxCommandEvent
&
event
);
void
SVG_Print
(
wxCommandEvent
&
event
);
void
OnActivate
(
wxActivateEvent
&
event
);
void
OnActivate
(
wxActivateEvent
&
event
);
void
ReDrawPanel
();
void
TraceWorkSheet
(
wxDC
*
DC
,
BASE_SCREEN
*
screen
,
int
line_width
);
void
TraceWorkSheet
(
wxDC
*
DC
,
BASE_SCREEN
*
screen
,
int
line_width
);
void
PlotWorkSheet
(
PLOTTER
*
plotter
,
BASE_SCREEN
*
screen
);
void
PlotWorkSheet
(
PLOTTER
*
plotter
,
BASE_SCREEN
*
screen
);
...
...
pcbnew/dialog_general_options.cpp
View file @
c2ea4a0a
...
@@ -19,12 +19,10 @@
...
@@ -19,12 +19,10 @@
#include "pcbnew_id.h"
#include "pcbnew_id.h"
Dialog_GeneralOptions
::
Dialog_GeneralOptions
(
WinEDA_PcbFrame
*
parent
,
Dialog_GeneralOptions
::
Dialog_GeneralOptions
(
WinEDA_PcbFrame
*
parent
)
:
wxDC
*
DC
)
:
DialogGeneralOptionsBoardEditor_base
(
parent
)
DialogGeneralOptionsBoardEditor_base
(
parent
)
{
{
m_Parent
=
parent
;
m_Parent
=
parent
;
m_DC
=
DC
;
init
();
init
();
}
}
...
@@ -101,8 +99,8 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event )
...
@@ -101,8 +99,8 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event )
if
(
g_Show_Ratsnest
!=
m_ShowGlobalRatsnest
->
GetValue
()
)
if
(
g_Show_Ratsnest
!=
m_ShowGlobalRatsnest
->
GetValue
()
)
{
{
g_Show_Ratsnest
=
m_ShowGlobalRatsnest
->
GetValue
();
g_Show_Ratsnest
=
m_ShowGlobalRatsnest
->
GetValue
();
m_Parent
->
Ratsnest_On_Off
(
m_DC
);
m_Parent
->
Ratsnest_On_Off
(
NULL
);
m_Parent
->
RedrawActiveWindow
(
m_DC
,
true
);
m_Parent
->
DrawPanel
->
Refresh
(
);
}
}
g_Show_Module_Ratsnest
=
m_ShowModuleRatsnest
->
GetValue
();
g_Show_Module_Ratsnest
=
m_ShowModuleRatsnest
->
GetValue
();
g_AutoDeleteOldTrack
=
m_TrackAutodel
->
GetValue
();
g_AutoDeleteOldTrack
=
m_TrackAutodel
->
GetValue
();
...
@@ -121,8 +119,7 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event )
...
@@ -121,8 +119,7 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event )
#include "dialog_graphic_items_options.cpp"
#include "dialog_graphic_items_options.cpp"
void
WinEDA_PcbFrame
::
InstallPcbOptionsFrame
(
const
wxPoint
&
pos
,
void
WinEDA_PcbFrame
::
InstallPcbOptionsFrame
(
int
id
)
wxDC
*
DC
,
int
id
)
{
{
switch
(
id
)
switch
(
id
)
{
{
...
...
pcbnew/dialog_general_options.h
View file @
c2ea4a0a
...
@@ -9,12 +9,11 @@ class Dialog_GeneralOptions : public DialogGeneralOptionsBoardEditor_base
...
@@ -9,12 +9,11 @@ class Dialog_GeneralOptions : public DialogGeneralOptionsBoardEditor_base
{
{
private
:
private
:
WinEDA_PcbFrame
*
m_Parent
;
WinEDA_PcbFrame
*
m_Parent
;
wxDC
*
m_DC
;
void
init
();
void
init
();
public
:
public
:
Dialog_GeneralOptions
(
WinEDA_PcbFrame
*
parent
,
wxDC
*
DC
);
Dialog_GeneralOptions
(
WinEDA_PcbFrame
*
parent
);
~
Dialog_GeneralOptions
()
{};
~
Dialog_GeneralOptions
()
{};
void
OnOkClick
(
wxCommandEvent
&
event
);
void
OnOkClick
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
);
...
...
pcbnew/dialog_pad_properties.cpp
View file @
c2ea4a0a
...
@@ -55,11 +55,10 @@ class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
...
@@ -55,11 +55,10 @@ class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
{
{
public
:
public
:
WinEDA_BasePcbFrame
*
m_Parent
;
WinEDA_BasePcbFrame
*
m_Parent
;
wxDC
*
m_DC
;
D_PAD
*
m_CurrentPad
;
D_PAD
*
m_CurrentPad
;
public
:
public
:
DIALOG_PAD_PROPERTIES
(
WinEDA_BasePcbFrame
*
parent
,
D_PAD
*
Pad
,
wxDC
*
DC
);
DIALOG_PAD_PROPERTIES
(
WinEDA_BasePcbFrame
*
parent
,
D_PAD
*
Pad
);
void
InitDialog
(
);
void
InitDialog
(
);
void
OnPadShapeSelection
(
wxCommandEvent
&
event
);
void
OnPadShapeSelection
(
wxCommandEvent
&
event
);
void
OnDrillShapeSelected
(
wxCommandEvent
&
event
);
void
OnDrillShapeSelected
(
wxCommandEvent
&
event
);
...
@@ -72,12 +71,11 @@ public:
...
@@ -72,12 +71,11 @@ public:
/*******************************************************************************************/
/*******************************************************************************************/
DIALOG_PAD_PROPERTIES
::
DIALOG_PAD_PROPERTIES
(
WinEDA_BasePcbFrame
*
parent
,
D_PAD
*
Pad
,
wxDC
*
DC
)
:
DIALOG_PAD_PROPERTIES
::
DIALOG_PAD_PROPERTIES
(
WinEDA_BasePcbFrame
*
parent
,
D_PAD
*
Pad
)
:
DIALOG_PAD_PROPERTIES_BASE
(
parent
)
DIALOG_PAD_PROPERTIES_BASE
(
parent
)
/*******************************************************************************************/
/*******************************************************************************************/
{
{
m_Parent
=
parent
;
m_Parent
=
parent
;
m_DC
=
DC
;
m_CurrentPad
=
Pad
;
m_CurrentPad
=
Pad
;
if
(
m_CurrentPad
)
if
(
m_CurrentPad
)
...
@@ -95,10 +93,10 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD
...
@@ -95,10 +93,10 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( WinEDA_BasePcbFrame* parent, D_PAD
/*************************************************************/
/*************************************************************/
void
WinEDA_BasePcbFrame
::
InstallPadOptionsFrame
(
D_PAD
*
Pad
,
wxDC
*
DC
,
const
wxPoint
&
pos
)
void
WinEDA_BasePcbFrame
::
InstallPadOptionsFrame
(
D_PAD
*
Pad
)
/*************************************************************/
/*************************************************************/
{
{
DIALOG_PAD_PROPERTIES
dlg
(
this
,
Pad
,
DC
);
DIALOG_PAD_PROPERTIES
dlg
(
this
,
Pad
);
dlg
.
ShowModal
();
dlg
.
ShowModal
();
}
}
...
@@ -418,9 +416,6 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
...
@@ -418,9 +416,6 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
int
internalUnits
=
m_Parent
->
m_InternalUnits
;
int
internalUnits
=
m_Parent
->
m_InternalUnits
;
wxString
msg
;
wxString
msg
;
if
(
m_DC
)
m_Parent
->
DrawPanel
->
CursorOff
(
m_DC
);
g_Pad_Master
.
m_Attribut
=
CodeType
[
m_PadType
->
GetSelection
()];
g_Pad_Master
.
m_Attribut
=
CodeType
[
m_PadType
->
GetSelection
()];
g_Pad_Master
.
m_PadShape
=
CodeShape
[
m_PadShape
->
GetSelection
()];
g_Pad_Master
.
m_PadShape
=
CodeShape
[
m_PadShape
->
GetSelection
()];
...
@@ -489,11 +484,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
...
@@ -489,11 +484,7 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
}
}
if
(
error
)
if
(
error
)
{
if
(
m_DC
)
m_Parent
->
DrawPanel
->
CursorOn
(
m_DC
);
return
;
return
;
}
PadLayerMask
=
0
;
PadLayerMask
=
0
;
if
(
m_PadLayerCu
->
GetValue
()
)
if
(
m_PadLayerCu
->
GetValue
()
)
...
@@ -533,12 +524,12 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
...
@@ -533,12 +524,12 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
m_Parent
->
SaveCopyInUndoList
(
Module
,
UR_CHANGED
);
m_Parent
->
SaveCopyInUndoList
(
Module
,
UR_CHANGED
);
Module
->
m_LastEdit_Time
=
time
(
NULL
);
Module
->
m_LastEdit_Time
=
time
(
NULL
);
if
(
m_DC
)
// redraw the area where the pad was, without pad (delete pad on screen)
// redraw the area where the pad was, without pad (delete pad on screen)
{
m_CurrentPad
->
m_Flags
|=
DO_NOT_DRAW
;
m_CurrentPad
->
m_Flags
|=
DO_NOT_DRAW
;
m_Parent
->
DrawPanel
->
PostDirtyRect
(
m_CurrentPad
->
GetBoundingBox
()
);
m_Parent
->
DrawPanel
->
PostDirtyRect
(
m_CurrentPad
->
GetBoundingBox
()
);
m_CurrentPad
->
m_Flags
&=
~
DO_NOT_DRAW
;
m_CurrentPad
->
m_Flags
&=
~
DO_NOT_DRAW
;
}
// Update values
m_CurrentPad
->
m_PadShape
=
g_Pad_Master
.
m_PadShape
;
m_CurrentPad
->
m_PadShape
=
g_Pad_Master
.
m_PadShape
;
m_CurrentPad
->
m_Attribut
=
g_Pad_Master
.
m_Attribut
;
m_CurrentPad
->
m_Attribut
=
g_Pad_Master
.
m_Attribut
;
if
(
m_CurrentPad
->
m_Pos
!=
g_Pad_Master
.
m_Pos
)
if
(
m_CurrentPad
->
m_Pos
!=
g_Pad_Master
.
m_Pos
)
...
@@ -634,15 +625,13 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
...
@@ -634,15 +625,13 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
Module
->
Set_Rectangle_Encadrement
();
Module
->
Set_Rectangle_Encadrement
();
m_CurrentPad
->
DisplayInfo
(
m_Parent
);
m_CurrentPad
->
DisplayInfo
(
m_Parent
);
if
(
m_DC
)
// redraw the area where the pad was
// redraw the area where the pad was
m_Parent
->
DrawPanel
->
PostDirtyRect
(
m_CurrentPad
->
GetBoundingBox
()
);
m_Parent
->
DrawPanel
->
PostDirtyRect
(
m_CurrentPad
->
GetBoundingBox
()
);
m_Parent
->
GetScreen
()
->
SetModify
();
m_Parent
->
GetScreen
()
->
SetModify
();
}
}
EndModal
(
1
);
EndModal
(
1
);
if
(
m_DC
)
m_Parent
->
DrawPanel
->
CursorOn
(
m_DC
);
if
(
RastnestIsChanged
)
// The net ratsnest must be recalculated
if
(
RastnestIsChanged
)
// The net ratsnest must be recalculated
m_Parent
->
GetBoard
()
->
m_Status_Pcb
=
0
;
m_Parent
->
GetBoard
()
->
m_Status_Pcb
=
0
;
}
}
...
...
pcbnew/edit.cpp
View file @
c2ea4a0a
...
@@ -689,7 +689,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -689,7 +689,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
case
ID_POPUP_PCB_EDIT_PAD
:
case
ID_POPUP_PCB_EDIT_PAD
:
InstallPadOptionsFrame
(
(
D_PAD
*
)
GetCurItem
()
,
&
dc
,
pos
);
InstallPadOptionsFrame
(
(
D_PAD
*
)
GetCurItem
()
);
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
break
;
break
;
...
...
pcbnew/files.cpp
View file @
c2ea4a0a
...
@@ -270,7 +270,7 @@ this file again."));
...
@@ -270,7 +270,7 @@ this file again."));
AuxiliaryToolBar_Update_UI
();
AuxiliaryToolBar_Update_UI
();
// Display the loaded board:
// Display the loaded board:
DrawPanel
->
Refresh
(
true
);
Zoom_Automatique
(
false
);
wxSafeYield
();
// Needed if we want to see the board now.
wxSafeYield
();
// Needed if we want to see the board now.
// Compile rastnest and displays net info
// Compile rastnest and displays net info
...
...
pcbnew/globaleditpad.cpp
View file @
c2ea4a0a
...
@@ -80,11 +80,7 @@ void DIALOG_GLOBAL_PADS_EDITION::OnCancelClick( wxCommandEvent& event )
...
@@ -80,11 +80,7 @@ void DIALOG_GLOBAL_PADS_EDITION::OnCancelClick( wxCommandEvent& event )
*/
*/
void
DIALOG_GLOBAL_PADS_EDITION
::
InstallPadEditor
(
wxCommandEvent
&
event
)
void
DIALOG_GLOBAL_PADS_EDITION
::
InstallPadEditor
(
wxCommandEvent
&
event
)
{
{
KicadGraphicContext
dc
(
m_Parent
->
DrawPanel
);
m_Parent
->
InstallPadOptionsFrame
(
m_CurrentPad
);
m_Parent
->
DrawPanel
->
CursorOff
(
&
dc
);
m_Parent
->
InstallPadOptionsFrame
(
m_CurrentPad
,
&
dc
,
wxDefaultPosition
);
m_Parent
->
DrawPanel
->
CursorOn
(
&
dc
);
}
}
...
...
pcbnew/modedit.cpp
View file @
c2ea4a0a
...
@@ -401,7 +401,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -401,7 +401,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
break
;
case
ID_MODEDIT_PAD_SETTINGS
:
case
ID_MODEDIT_PAD_SETTINGS
:
InstallPadOptionsFrame
(
NULL
,
NULL
,
wxPoint
(
-
1
,
-
1
)
);
InstallPadOptionsFrame
(
NULL
);
break
;
break
;
case
ID_MODEDIT_CHECK
:
case
ID_MODEDIT_CHECK
:
...
@@ -427,7 +427,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -427,7 +427,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
else
else
{
{
SetToolID
(
id
,
wxCURSOR_ARROW
,
_
(
"Pad Settings"
)
);
SetToolID
(
id
,
wxCURSOR_ARROW
,
_
(
"Pad Settings"
)
);
InstallPadOptionsFrame
(
NULL
,
NULL
,
wxPoint
(
-
1
,
-
1
)
);
InstallPadOptionsFrame
(
NULL
);
SetToolID
(
0
,
wxCURSOR_ARROW
,
wxEmptyString
);
SetToolID
(
0
,
wxCURSOR_ARROW
,
wxEmptyString
);
}
}
break
;
break
;
...
@@ -491,8 +491,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -491,8 +491,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_EDIT_PAD
:
case
ID_POPUP_PCB_EDIT_PAD
:
{
{
InstallPadOptionsFrame
(
(
D_PAD
*
)
GetScreen
()
->
GetCurItem
(),
InstallPadOptionsFrame
(
(
D_PAD
*
)
GetScreen
()
->
GetCurItem
()
);
&
dc
,
pos
);
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
}
}
break
;
break
;
...
@@ -626,7 +625,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -626,7 +625,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
if
(
item
->
Type
()
!=
TYPE_PAD
)
if
(
item
->
Type
()
!=
TYPE_PAD
)
item
=
NULL
;
item
=
NULL
;
}
}
InstallPadOptionsFrame
(
(
D_PAD
*
)
item
,
&
dc
,
pos
);
InstallPadOptionsFrame
(
(
D_PAD
*
)
item
);
}
}
break
;
break
;
...
...
pcbnew/modedit_onclick.cpp
View file @
c2ea4a0a
...
@@ -400,7 +400,7 @@ void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -400,7 +400,7 @@ void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
switch
(
DrawStruct
->
Type
()
)
switch
(
DrawStruct
->
Type
()
)
{
{
case
TYPE_PAD
:
case
TYPE_PAD
:
InstallPadOptionsFrame
(
(
D_PAD
*
)
DrawStruct
,
DC
,
pos
);
InstallPadOptionsFrame
(
(
D_PAD
*
)
DrawStruct
);
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
break
;
break
;
...
@@ -409,7 +409,6 @@ void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -409,7 +409,6 @@ void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
DIALOG_MODULE_MODULE_EDITOR
dialog
(
this
,
(
MODULE
*
)
DrawStruct
);
DIALOG_MODULE_MODULE_EDITOR
dialog
(
this
,
(
MODULE
*
)
DrawStruct
);
int
ret
=
dialog
.
ShowModal
();
int
ret
=
dialog
.
ShowModal
();
GetScreen
()
->
GetCurItem
()
->
m_Flags
=
0
;
GetScreen
()
->
GetCurItem
()
->
m_Flags
=
0
;
GetScreen
()
->
GetCurItem
()
->
m_Flags
=
0
;
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
if
(
ret
>
0
)
if
(
ret
>
0
)
DrawPanel
->
Refresh
();
DrawPanel
->
Refresh
();
...
...
pcbnew/onleftclick.cpp
View file @
c2ea4a0a
...
@@ -426,7 +426,7 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -426,7 +426,7 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break
;
break
;
case
TYPE_PAD
:
case
TYPE_PAD
:
InstallPadOptionsFrame
(
(
D_PAD
*
)
DrawStruct
,
DC
,
pos
);
InstallPadOptionsFrame
(
(
D_PAD
*
)
DrawStruct
);
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
break
;
break
;
...
...
pcbnew/pcbframe.cpp
View file @
c2ea4a0a
...
@@ -215,6 +215,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
...
@@ -215,6 +215,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
{
{
m_FrameName
=
wxT
(
"PcbFrame"
);
m_FrameName
=
wxT
(
"PcbFrame"
);
m_Draw_Sheet_Ref
=
true
;
// true to display sheet references
m_Draw_Sheet_Ref
=
true
;
// true to display sheet references
m_Draw_Axis
=
false
;
// true to display X and Y axis
m_Draw_Auxiliary_Axis
=
true
;
m_Draw_Auxiliary_Axis
=
true
;
m_SelTrackWidthBox
=
NULL
;
m_SelTrackWidthBox
=
NULL
;
m_SelViaSizeBox
=
NULL
;
m_SelViaSizeBox
=
NULL
;
...
...
pcbnew/pcbnew_config.cpp
View file @
c2ea4a0a
...
@@ -30,8 +30,6 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
...
@@ -30,8 +30,6 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
int
id
=
event
.
GetId
();
int
id
=
event
.
GetId
();
wxPoint
pos
;
wxPoint
pos
;
KicadGraphicContext
dc
(
DrawPanel
);
wxFileName
fn
;
wxFileName
fn
;
pos
=
GetPosition
();
pos
=
GetPosition
();
...
@@ -61,17 +59,17 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
...
@@ -61,17 +59,17 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
case
ID_OPTIONS_SETUP
:
case
ID_OPTIONS_SETUP
:
{
{
Dialog_GeneralOptions
dlg
(
this
,
&
dc
);
Dialog_GeneralOptions
dlg
(
this
);
dlg
.
ShowModal
();
dlg
.
ShowModal
();
}
}
break
;
break
;
case
ID_PCB_DRAWINGS_WIDTHS_SETUP
:
case
ID_PCB_DRAWINGS_WIDTHS_SETUP
:
InstallPcbOptionsFrame
(
pos
,
&
dc
,
id
);
InstallPcbOptionsFrame
(
id
);
break
;
break
;
case
ID_PCB_PAD_SETUP
:
case
ID_PCB_PAD_SETUP
:
InstallPadOptionsFrame
(
NULL
,
NULL
,
pos
);
InstallPadOptionsFrame
(
NULL
);
break
;
break
;
case
ID_CONFIG_SAVE
:
case
ID_CONFIG_SAVE
:
...
...
pcbnew/tool_onrightclick.cpp
View file @
c2ea4a0a
...
@@ -38,7 +38,7 @@ void WinEDA_PcbFrame::ToolOnRightClick( wxCommandEvent& event )
...
@@ -38,7 +38,7 @@ void WinEDA_PcbFrame::ToolOnRightClick( wxCommandEvent& event )
case
ID_PCB_ADD_LINE_BUTT
:
case
ID_PCB_ADD_LINE_BUTT
:
case
ID_PCB_COTATION_BUTT
:
case
ID_PCB_COTATION_BUTT
:
case
ID_PCB_ADD_TEXT_BUTT
:
case
ID_PCB_ADD_TEXT_BUTT
:
InstallPcbOptionsFrame
(
pos
,
NULL
,
ID_PCB_DRAWINGS_WIDTHS_SETUP
);
InstallPcbOptionsFrame
(
ID_PCB_DRAWINGS_WIDTHS_SETUP
);
break
;
break
;
default
:
default
:
...
@@ -59,7 +59,7 @@ void WinEDA_ModuleEditFrame::ToolOnRightClick( wxCommandEvent& event )
...
@@ -59,7 +59,7 @@ void WinEDA_ModuleEditFrame::ToolOnRightClick( wxCommandEvent& event )
switch
(
id
)
switch
(
id
)
{
{
case
ID_MODEDIT_ADD_PAD
:
case
ID_MODEDIT_ADD_PAD
:
InstallPadOptionsFrame
(
NULL
,
NULL
,
wxPoint
(
-
1
,
-
1
)
);
InstallPadOptionsFrame
(
NULL
);
break
;
break
;
case
ID_PCB_CIRCLE_BUTT
:
case
ID_PCB_CIRCLE_BUTT
:
...
...
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