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
69b19f51
Commit
69b19f51
authored
Dec 22, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Libedit: fix a bug (affects only multi parts per packages) after moving an item.
parent
b98538ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
8 deletions
+17
-8
hotkeys.cpp
eeschema/hotkeys.cpp
+7
-2
lib_field.cpp
eeschema/lib_field.cpp
+0
-2
symbdraw.cpp
eeschema/symbdraw.cpp
+10
-4
No files found.
eeschema/hotkeys.cpp
View file @
69b19f51
...
@@ -673,8 +673,13 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct )
...
@@ -673,8 +673,13 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* DC, int hotkey, EDA_ITEM* DrawStruct )
if
(
DrawStruct
==
NULL
)
if
(
DrawStruct
==
NULL
)
{
{
// Find the schematic object to move under the cursor
// For a drag or copy command, try to find first a component:
DrawStruct
=
SchematicGeneralLocateAndDisplay
(
false
);
if
(
DrawStruct
==
NULL
&&
HK_Descr
->
m_Idcommand
!=
HK_MOVE_COMPONENT_OR_ITEM
)
DrawStruct
=
LocateSmallestComponent
(
GetScreen
()
);
// If no component, find the schematic object to move/drag or copy under the cursor
if
(
DrawStruct
==
NULL
)
DrawStruct
=
SchematicGeneralLocateAndDisplay
(
false
);
if
(
DrawStruct
==
NULL
)
if
(
DrawStruct
==
NULL
)
break
;
break
;
...
...
eeschema/lib_field.cpp
View file @
69b19f51
...
@@ -326,8 +326,6 @@ void LIB_FIELD::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint&
...
@@ -326,8 +326,6 @@ void LIB_FIELD::drawGraphic( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint&
if
(
aData
)
if
(
aData
)
text
=
*
(
wxString
*
)
aData
;
text
=
*
(
wxString
*
)
aData
;
else
if
(
InEditMode
()
)
text
=
GetFullText
(
m_Unit
);
else
else
text
=
m_Text
;
text
=
m_Text
;
...
...
eeschema/symbdraw.cpp
View file @
69b19f51
...
@@ -242,7 +242,16 @@ static void RedrawWhileMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool era
...
@@ -242,7 +242,16 @@ static void RedrawWhileMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool era
BASE_SCREEN
*
Screen
=
panel
->
GetScreen
();
BASE_SCREEN
*
Screen
=
panel
->
GetScreen
();
item
->
SetEraseLastDrawItem
(
erase
);
item
->
SetEraseLastDrawItem
(
erase
);
item
->
Draw
(
panel
,
DC
,
Screen
->
GetCursorDrawPosition
(),
-
1
,
g_XorMode
,
NULL
,
// if item is the reference field, we must add the current unit id
if
(
item
->
Type
()
==
LIB_FIELD_T
)
{
int
unit
=
((
LIB_EDIT_FRAME
*
)
panel
->
GetParent
())
->
GetUnit
();
wxString
text
=
((
LIB_FIELD
*
)
item
)
->
GetFullText
(
unit
);
item
->
Draw
(
panel
,
DC
,
Screen
->
GetCursorDrawPosition
(),
-
1
,
g_XorMode
,
&
text
,
DefaultTransform
);
}
else
item
->
Draw
(
panel
,
DC
,
Screen
->
GetCursorDrawPosition
(),
-
1
,
g_XorMode
,
NULL
,
DefaultTransform
);
DefaultTransform
);
}
}
...
@@ -254,9 +263,6 @@ void LIB_EDIT_FRAME::StartMoveDrawSymbol( wxDC* DC )
...
@@ -254,9 +263,6 @@ void LIB_EDIT_FRAME::StartMoveDrawSymbol( wxDC* DC )
SetCursor
(
wxCURSOR_HAND
);
SetCursor
(
wxCURSOR_HAND
);
if
(
m_drawItem
->
GetUnit
()
!=
m_unit
)
m_drawItem
->
SetUnit
(
m_unit
);
TempCopyComponent
();
TempCopyComponent
();
m_drawItem
->
BeginEdit
(
IS_MOVED
,
GetScreen
()
->
GetCursorDrawPosition
()
);
m_drawItem
->
BeginEdit
(
IS_MOVED
,
GetScreen
()
->
GetCursorDrawPosition
()
);
DrawPanel
->
ManageCurseur
=
RedrawWhileMovingCursor
;
DrawPanel
->
ManageCurseur
=
RedrawWhileMovingCursor
;
...
...
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