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
2057c815
Commit
2057c815
authored
Sep 18, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
position new modules at (0,0)
parent
b24418d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
32 deletions
+35
-32
modedit.cpp
pcbnew/modedit.cpp
+35
-32
No files found.
pcbnew/modedit.cpp
View file @
2057c815
...
...
@@ -24,9 +24,8 @@ BOARD_ITEM* WinEDA_ModuleEditFrame::ModeditLocateAndDisplay( int aHotKeyCode )
/****************************************************************************/
{
BOARD_ITEM
*
item
=
GetCurItem
();
MODULE
*
Module
=
m_Pcb
->
m_Modules
;
if
(
Module
==
NULL
)
if
(
m_Pcb
->
m_Modules
==
NULL
)
return
NULL
;
GENERAL_COLLECTORS_GUIDE
guide
=
GetCollectorsGuide
();
...
...
@@ -201,31 +200,37 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_LIBEDIT_DELETE_PART
:
{
wxString
Line
;
Line
=
MakeFileName
(
g_RealLibDirBuffer
,
m_CurrentLib
,
LibExtBuffer
);
Delete_Module_In_Library
(
Line
);
}
{
wxString
Line
;
Line
=
MakeFileName
(
g_RealLibDirBuffer
,
m_CurrentLib
,
LibExtBuffer
);
Delete_Module_In_Library
(
Line
);
}
break
;
case
ID_MODEDIT_NEW_MODULE
:
Clear_Pcb
(
TRUE
);
GetScreen
()
->
ClearUndoRedoList
();
SetCurItem
(
NULL
);
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
Create_1_Module
(
&
dc
,
wxEmptyString
);
if
(
m_Pcb
->
m_Modules
)
m_Pcb
->
m_Modules
->
m_Flags
=
0
;
Zoom_Automatique
(
TRUE
);
{
Clear_Pcb
(
TRUE
);
GetScreen
()
->
ClearUndoRedoList
();
SetCurItem
(
NULL
);
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
MODULE
*
module
=
Create_1_Module
(
&
dc
,
wxEmptyString
);
wxASSERT
(
module
);
module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
if
(
m_Pcb
->
m_Modules
)
m_Pcb
->
m_Modules
->
m_Flags
=
0
;
Zoom_Automatique
(
TRUE
);
}
break
;
case
ID_MODEDIT_SAVE_LIBMODULE
:
{
wxString
Line
;
Line
=
MakeFileName
(
g_RealLibDirBuffer
,
m_CurrentLib
.
GetData
(),
LibExtBuffer
);
Save_1_Module
(
Line
,
m_Pcb
->
m_Modules
,
TRUE
,
TRUE
);
GetScreen
()
->
ClrModify
();
}
{
wxString
Line
;
Line
=
MakeFileName
(
g_RealLibDirBuffer
,
m_CurrentLib
.
GetData
(),
LibExtBuffer
);
Save_1_Module
(
Line
,
m_Pcb
->
m_Modules
,
TRUE
,
TRUE
);
GetScreen
()
->
ClrModify
();
}
break
;
case
ID_MODEDIT_LOAD_MODULE_FROM_BOARD
:
...
...
@@ -339,7 +344,6 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_MODEDIT_LOAD_MODULE
:
{
GetScreen
()
->
ClearUndoRedoList
();
SetCurItem
(
NULL
);
Clear_Pcb
(
TRUE
);
...
...
@@ -369,7 +373,6 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
if
(
m_Draw3DFrame
)
m_Draw3DFrame
->
NewDisplay
();
break
;
}
case
ID_MODEDIT_PAD_SETTINGS
:
InstallPadOptionsFrame
(
NULL
,
NULL
,
wxPoint
(
-
1
,
-
1
)
);
...
...
@@ -517,17 +520,17 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_POPUP_PCB_ENTER_EDGE_WIDTH
:
{
EDGE_MODULE
*
edge
=
NULL
;
if
(
GetScreen
()
->
GetCurItem
()
&&
(
GetScreen
()
->
GetCurItem
()
->
m_Flags
&
IS_NEW
)
&&
(
GetScreen
()
->
GetCurItem
()
->
Type
()
==
TYPEEDGEMODULE
)
)
{
edge
=
(
EDGE_MODULE
*
)
GetScreen
()
->
GetCurItem
();
EDGE_MODULE
*
edge
=
NULL
;
if
(
GetScreen
()
->
GetCurItem
()
&&
(
GetScreen
()
->
GetCurItem
()
->
m_Flags
&
IS_NEW
)
&&
(
GetScreen
()
->
GetCurItem
()
->
Type
()
==
TYPEEDGEMODULE
)
)
{
edge
=
(
EDGE_MODULE
*
)
GetScreen
()
->
GetCurItem
();
}
Enter_Edge_Width
(
edge
,
&
dc
);
DrawPanel
->
MouseToCursorSchema
();
}
Enter_Edge_Width
(
edge
,
&
dc
);
DrawPanel
->
MouseToCursorSchema
();
}
break
;
case
ID_POPUP_PCB_EDIT_WIDTH_CURRENT_EDGE
:
...
...
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