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
2ea76d31
Commit
2ea76d31
authored
Sep 21, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solved: bug in libedit which crashes pcbnew when closing the footprint properties dialog
parent
26c607d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
dialog_edit_module.cpp
pcbnew/dialog_edit_module.cpp
+17
-9
No files found.
pcbnew/dialog_edit_module.cpp
View file @
2ea76d31
...
@@ -171,6 +171,9 @@ void WinEDA_ModulePropertiesFrame::BuildPanelModuleProperties( bool FullOptions
...
@@ -171,6 +171,9 @@ void WinEDA_ModulePropertiesFrame::BuildPanelModuleProperties( bool FullOptions
wxStaticText
*
XPositionStatic
=
new
wxStaticText
(
m_PanelProperties
,
-
1
,
_
(
"X"
));
wxStaticText
*
XPositionStatic
=
new
wxStaticText
(
m_PanelProperties
,
-
1
,
_
(
"X"
));
wxStaticText
*
YPositionStatic
=
new
wxStaticText
(
m_PanelProperties
,
-
1
,
_
(
"Y"
));
wxStaticText
*
YPositionStatic
=
new
wxStaticText
(
m_PanelProperties
,
-
1
,
_
(
"Y"
));
m_ModPositionX
=
NULL
;
m_ModPositionY
=
NULL
;
/* Create a sizer for controls in the left column */
/* Create a sizer for controls in the left column */
PropLeftSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
PropLeftSizer
=
new
wxBoxSizer
(
wxVERTICAL
);
m_PanelPropertiesBoxSizer
->
Add
(
PropLeftSizer
,
0
,
wxGROW
|
wxALL
,
5
);
m_PanelPropertiesBoxSizer
->
Add
(
PropLeftSizer
,
0
,
wxGROW
|
wxALL
,
5
);
...
@@ -522,16 +525,20 @@ void WinEDA_ModulePropertiesFrame::OnOkClick( wxCommandEvent& event )
...
@@ -522,16 +525,20 @@ void WinEDA_ModulePropertiesFrame::OnOkClick( wxCommandEvent& event )
bool
change_layer
=
FALSE
;
bool
change_layer
=
FALSE
;
wxPoint
modpos
;
wxPoint
modpos
;
// Set Module Position
modpos
.
x
=
ReturnValueFromTextCtrl
(
*
m_ModPositionX
,
PCB_INTERNAL_UNIT
);
modpos
.
y
=
ReturnValueFromTextCtrl
(
*
m_ModPositionY
,
PCB_INTERNAL_UNIT
);
m_CurrentModule
->
SetPosition
(
modpos
);
if
(
m_DC
)
if
(
m_DC
)
{
m_Parent
->
DrawPanel
->
CursorOff
(
m_DC
);
m_Parent
->
DrawPanel
->
CursorOff
(
m_DC
);
m_CurrentModule
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
GR_XOR
);
}
if
(
m_DC
)
// Set Module Position, if the dialog is called from the board editor
m_Parent
->
DrawPanel
->
CursorOff
(
m_DC
);
// if the dialog is called from the footprint editor, do nothing because the footprint is always in position 0,0
if
(
m_ModPositionX
&&
m_ModPositionY
)
{
modpos
.
x
=
ReturnValueFromTextCtrl
(
*
m_ModPositionX
,
PCB_INTERNAL_UNIT
);
modpos
.
y
=
ReturnValueFromTextCtrl
(
*
m_ModPositionY
,
PCB_INTERNAL_UNIT
);
m_CurrentModule
->
SetPosition
(
modpos
);
}
if
(
m_OrientValue
)
if
(
m_OrientValue
)
{
{
...
@@ -621,9 +628,10 @@ void WinEDA_ModulePropertiesFrame::OnOkClick( wxCommandEvent& event )
...
@@ -621,9 +628,10 @@ void WinEDA_ModulePropertiesFrame::OnOkClick( wxCommandEvent& event )
EndModal
(
1
);
EndModal
(
1
);
if
(
m_DC
)
if
(
m_DC
)
{
m_CurrentModule
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
GR_OR
);
m_CurrentModule
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
GR_OR
);
if
(
m_DC
)
m_Parent
->
DrawPanel
->
CursorOn
(
m_DC
);
m_Parent
->
DrawPanel
->
CursorOn
(
m_DC
);
}
}
}
...
...
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