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
2d972fcf
Commit
2d972fcf
authored
May 05, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Libedit: other fix in pin edition.
parent
70de08f3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
8 deletions
+25
-8
hotkeys.cpp
eeschema/hotkeys.cpp
+1
-1
lib_pin.cpp
eeschema/lib_pin.cpp
+20
-7
libeditframe.cpp
eeschema/libeditframe.cpp
+4
-0
No files found.
eeschema/hotkeys.cpp
View file @
2d972fcf
...
@@ -957,7 +957,7 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
...
@@ -957,7 +957,7 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
break
;
break
;
case
HK_ROTATE
:
case
HK_ROTATE
:
if
(
m_drawItem
==
NULL
)
if
(
!
itemInEdit
)
m_drawItem
=
LocateItemUsingCursor
(
aPosition
);
m_drawItem
=
LocateItemUsingCursor
(
aPosition
);
if
(
m_drawItem
)
if
(
m_drawItem
)
...
...
eeschema/lib_pin.cpp
View file @
2d972fcf
...
@@ -1878,16 +1878,29 @@ int LIB_PIN::GetOrientationCodeIndex( int code )
...
@@ -1878,16 +1878,29 @@ int LIB_PIN::GetOrientationCodeIndex( int code )
void
LIB_PIN
::
Rotate
()
void
LIB_PIN
::
Rotate
()
{
{
// Get the actual pin orientation index
int
orient
=
PIN_RIGHT
;
int
i
=
GetOrientationCodeIndex
(
GetOrientation
()
);
// Compute the next orientation, swap lower two bits for the right order
switch
(
GetOrientation
()
)
i
=
(
(
i
&
2
)
>>
1
)
|
(
(
i
&
1
)
<<
1
);
{
i
=
i
+
1
;
case
PIN_UP
:
i
=
(
(
i
&
2
)
>>
1
)
|
(
(
i
&
1
)
<<
1
);
orient
=
PIN_LEFT
;
break
;
case
PIN_DOWN
:
orient
=
PIN_RIGHT
;
break
;
case
PIN_LEFT
:
orient
=
PIN_DOWN
;
break
;
case
PIN_RIGHT
:
orient
=
PIN_UP
;
break
;
}
// Set the new orientation
// Set the new orientation
SetOrientation
(
GetOrientationCode
(
i
)
);
SetOrientation
(
orient
);
}
}
...
...
eeschema/libeditframe.cpp
View file @
2d972fcf
...
@@ -1071,6 +1071,10 @@ void LIB_EDIT_FRAME::OnRotateItem( wxCommandEvent& aEvent )
...
@@ -1071,6 +1071,10 @@ void LIB_EDIT_FRAME::OnRotateItem( wxCommandEvent& aEvent )
m_drawItem
->
Rotate
();
m_drawItem
->
Rotate
();
OnModify
();
OnModify
();
if
(
!
m_drawItem
->
InEditMode
()
)
m_drawItem
->
ClearFlags
();
DrawPanel
->
Refresh
();
DrawPanel
->
Refresh
();
if
(
GetToolId
()
==
ID_NO_TOOL_SELECTED
)
if
(
GetToolId
()
==
ID_NO_TOOL_SELECTED
)
...
...
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