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
a93fd711
Commit
a93fd711
authored
Oct 10, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more pcbnew's onrightclick behavior
parent
b8ae79ed
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
10 deletions
+36
-10
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+16
-2
editrack.cpp
pcbnew/editrack.cpp
+7
-4
onrightclick.cpp
pcbnew/onrightclick.cpp
+13
-4
No files found.
pcbnew/basepcbframe.cpp
View file @
a93fd711
...
...
@@ -205,13 +205,27 @@ void WinEDA_BasePcbFrame::SetCurItem( BOARD_ITEM* aItem )
/*****************************************************************/
{
m_CurrentScreen
->
SetCurItem
(
aItem
);
if
(
aItem
)
{
aItem
->
Display_Infos
(
this
);
#if defined(DEBUG)
aItem
->
Show
(
0
,
std
::
cout
);
#endif
}
else
{
// we can use either of these:
// we can use either of these two:
//MsgPanel->EraseMsgBox();
m_Pcb
->
Display_Infos
(
this
);
m_Pcb
->
Display_Infos
(
this
);
// show the BOARD stuff
#if defined(DEBUG)
std
::
cout
<<
"SetCurItem(NULL)
\n
"
;
#endif
}
}
...
...
pcbnew/editrack.cpp
View file @
a93fd711
...
...
@@ -37,28 +37,30 @@ static void Exit_Editrack( WinEDA_DrawPanel* Panel, wxDC* DC )
*/
{
WinEDA_PcbFrame
*
frame
=
(
WinEDA_PcbFrame
*
)
Panel
->
m_Parent
;
TRACK
*
track
=
(
TRACK
*
)
frame
->
Get
Screen
()
->
Get
CurItem
();
TRACK
*
track
=
(
TRACK
*
)
frame
->
GetCurItem
();
if
(
track
!=
NULL
)
if
(
track
&&
(
track
->
Type
()
==
TYPEVIA
||
track
->
Type
()
==
TYPETRACK
)
)
{
/* Erase the current drawing */
ShowNewTrackWhenMovingCursor
(
Panel
,
DC
,
FALSE
);
if
(
g_HightLigt_Status
)
frame
->
Hight_Light
(
DC
);
g_HightLigth_NetCode
=
OldNetCodeSurbrillance
;
if
(
OldEtatSurbrillance
)
frame
->
Hight_Light
(
DC
);
frame
->
MsgPanel
->
EraseMsgBox
();
TRACK
*
previoustrack
;
// Delete current (new) track
for
(
;
track
!=
NULL
;
track
=
previoustrack
)
TRACK
*
previoustrack
;
for
(
;
track
;
track
=
previoustrack
)
{
previoustrack
=
(
TRACK
*
)
track
->
Pback
;
delete
track
;
}
}
Panel
->
ManageCurseur
=
NULL
;
Panel
->
ForceCloseManageCurseur
=
NULL
;
frame
->
SetCurItem
(
NULL
);
...
...
@@ -273,6 +275,7 @@ int Add_45_degrees_Segment( WinEDA_BasePcbFrame* frame, wxDC* DC, TRACK* pt_segm
// les segments doivent etre de longueur suffisante:
if
(
MAX
(
abs
(
dx0
),
abs
(
dy0
)
)
<
(
pas_45
*
2
)
)
return
0
;
if
(
MAX
(
abs
(
dx1
),
abs
(
dy1
)
)
<
(
pas_45
*
2
)
)
return
0
;
...
...
pcbnew/onrightclick.cpp
View file @
a93fd711
...
...
@@ -13,6 +13,8 @@
#include "id.h"
#include "hotkeys.h"
#include "collectors.h"
#include "protos.h"
/* Bitmaps */
#include "bitmaps.h"
...
...
@@ -171,9 +173,16 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
// printf( "cursor=(%d, %d) select=(%d,%d)\n", cursorPos.x, cursorPos.y, selectPos.x, selectPos.y );
// If there is no selected item or the right click happened at a position
// other than where the selection was made
if
(
!
item
||
cursorPos
!=
selectPos
)
/* If not editing a track, and there is no selected item or the right click
happened at a position other than where the selection was made.
We cannot call PcbGeneralLocateAndDisplay() when dragging a track because
editrack.cpp's void Exit_Editrack( WinEDA_DrawPanel* Panel, wxDC* DC )
uses GetCurItem(), thinking it is an aborted track, yet after calling
PcbGeneralLocateAndDisplay(), GetCurItem() is any arbitrary BOARD_ITEM,
not the aborted track.
*/
if
(
ShowNewTrackWhenMovingCursor
!=
DrawPanel
->
ManageCurseur
&&
(
!
item
||
cursorPos
!=
selectPos
)
)
{
DrawPanel
->
m_AbortRequest
=
false
;
item
=
PcbGeneralLocateAndDisplay
();
...
...
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