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
2be6520a
Commit
2be6520a
authored
Aug 12, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More about undo/redo in pcbnew and minor cleanup
parent
32c54e49
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
81 additions
and
143 deletions
+81
-143
block_commande.cpp
common/block_commande.cpp
+3
-3
cvframe.cpp
cvpcb/cvframe.cpp
+2
-2
menucfg.cpp
cvpcb/menucfg.cpp
+2
-2
block.cpp
eeschema/block.cpp
+2
-2
block_libedit.cpp
eeschema/block_libedit.cpp
+4
-4
libedit_onrightclick.cpp
eeschema/libedit_onrightclick.cpp
+1
-1
libframe.cpp
eeschema/libframe.cpp
+3
-3
block.cpp
gerbview/block.cpp
+2
-2
edit.cpp
gerbview/edit.cpp
+5
-32
block_commande.h
include/block_commande.h
+1
-1
id.h
include/id.h
+4
-13
block.cpp
pcbnew/block.cpp
+2
-2
block_module_editor.cpp
pcbnew/block_module_editor.cpp
+23
-27
edit.cpp
pcbnew/edit.cpp
+3
-3
modedit.cpp
pcbnew/modedit.cpp
+17
-24
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+0
-5
moduleframe.cpp
pcbnew/moduleframe.cpp
+2
-8
onrightclick.cpp
pcbnew/onrightclick.cpp
+1
-1
zones_test_and_combine_areas.cpp
pcbnew/zones_test_and_combine_areas.cpp
+4
-8
No files found.
common/block_commande.cpp
View file @
2be6520a
...
...
@@ -88,8 +88,8 @@ void BLOCK_SELECTOR::SetMessageBlock( WinEDA_DrawFrame* frame )
msg
=
_
(
"Block Rotate"
);
break
;
case
BLOCK_
INVERT
:
/* Flip */
msg
=
_
(
"Block
Invert
"
);
case
BLOCK_
FLIP
:
/* Flip */
msg
=
_
(
"Block
Flip
"
);
break
;
case
BLOCK_MIRROR_X
:
...
...
@@ -204,7 +204,7 @@ bool WinEDA_DrawFrame::HandleBlockBegin( wxDC* DC, int key,
case
BLOCK_DELETE
:
/* Delete */
case
BLOCK_SAVE
:
/* Save */
case
BLOCK_ROTATE
:
/* Rotate 90 deg */
case
BLOCK_
INVERT
:
/* Flip */
case
BLOCK_
FLIP
:
/* Flip */
case
BLOCK_ZOOM
:
/* Window Zoom */
case
BLOCK_MIRROR_X
:
case
BLOCK_MIRROR_Y
:
/* mirror */
...
...
cvpcb/cvframe.cpp
View file @
2be6520a
...
...
@@ -40,9 +40,9 @@ BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame )
WinEDA_CvpcbFrame
::
SaveQuitCvpcb
)
EVT_MENU
(
ID_CVPCB_QUIT
,
WinEDA_CvpcbFrame
::
OnQuit
)
EVT_MENU
(
ID_
CVPCB_DISPLAY
_HELP
,
EVT_MENU
(
ID_
GENERAL
_HELP
,
WinEDA_CvpcbFrame
::
GetKicadHelp
)
EVT_MENU
(
ID_
CVPCB_DISPLAY_LICENCE
,
EVT_MENU
(
ID_
KICAD_ABOUT
,
WinEDA_CvpcbFrame
::
GetKicadAbout
)
EVT_MENU
(
ID_CONFIG_REQ
,
WinEDA_CvpcbFrame
::
ConfigCvpcb
)
...
...
cvpcb/menucfg.cpp
View file @
2be6520a
...
...
@@ -79,11 +79,11 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
// Menu Help:
wxMenu
*
helpMenu
=
new
wxMenu
;
item
=
new
wxMenuItem
(
helpMenu
,
ID_
CVPCB_DISPLAY
_HELP
,
_
(
"&Contents"
),
item
=
new
wxMenuItem
(
helpMenu
,
ID_
GENERAL
_HELP
,
_
(
"&Contents"
),
_
(
"Open the cvpcb manual"
)
);
item
->
SetBitmap
(
help_xpm
);
helpMenu
->
Append
(
item
);
item
=
new
wxMenuItem
(
helpMenu
,
ID_
CVPCB_DISPLAY_LICENCE
,
item
=
new
wxMenuItem
(
helpMenu
,
ID_
KICAD_ABOUT
,
_
(
"&About cvpcb"
),
_
(
"About cvpcb schematic to pcb converter"
)
);
item
->
SetBitmap
(
info_xpm
);
...
...
eeschema/block.cpp
View file @
2be6520a
...
...
@@ -168,7 +168,7 @@ void WinEDA_SchematicFrame::HandleBlockPlace( wxDC* DC )
case
BLOCK_ROTATE
:
case
BLOCK_MIRROR_X
:
case
BLOCK_MIRROR_Y
:
case
BLOCK_
INVERT
:
case
BLOCK_
FLIP
:
case
BLOCK_ABORT
:
case
BLOCK_SELECT_ITEMS_ONLY
:
break
;
...
...
@@ -295,7 +295,7 @@ int WinEDA_SchematicFrame::HandleBlockEnd( wxDC* DC )
block
->
m_State
=
STATE_BLOCK_MOVE
;
break
;
case
BLOCK_
INVERT
:
/* pcbnew only! */
case
BLOCK_
FLIP
:
/* pcbnew only! */
break
;
case
BLOCK_ROTATE
:
...
...
eeschema/block_libedit.cpp
View file @
2be6520a
...
...
@@ -231,7 +231,7 @@ int WinEDA_LibeditFrame::ReturnBlockCommand( int key )
break
;
case
GR_KB_CTRL
:
cmd
=
BLOCK_
INVERT
;
cmd
=
BLOCK_
MIRROR_Y
;
break
;
case
MOUSE_MIDDLE
:
...
...
@@ -310,11 +310,11 @@ int WinEDA_LibeditFrame::HandleBlockEnd( wxDC* DC )
case
BLOCK_PASTE
:
case
BLOCK_ROTATE
:
case
BLOCK_MIRROR_X
:
case
BLOCK_
MIRROR_Y
:
case
BLOCK_
FLIP
:
break
;
case
BLOCK_
INVERT
:
case
BLOCK_
MIRROR_Y
:
ItemsCount
=
MarkItemsInBloc
(
CurrentLibEntry
,
GetScreen
()
->
m_BlockLocate
);
if
(
ItemsCount
)
SaveCopyInUndoList
(
CurrentLibEntry
);
...
...
@@ -398,7 +398,7 @@ void WinEDA_LibeditFrame::HandleBlockPlace( wxDC* DC )
GetScreen
()
->
m_BlockLocate
.
ClearItemsList
();
break
;
case
BLOCK_
INVERT
:
/* Invert by popup menu, from block move */
case
BLOCK_
MIRROR_Y
:
/* Invert by popup menu, from block move */
SaveCopyInUndoList
(
CurrentLibEntry
);
MirrorMarkedItems
(
CurrentLibEntry
,
GetScreen
()
->
m_BlockLocate
.
Centre
()
);
break
;
...
...
eeschema/libedit_onrightclick.cpp
View file @
2be6520a
...
...
@@ -244,7 +244,7 @@ void AddMenusForBlock(wxMenu * PopMenu, WinEDA_LibeditFrame * frame)
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SELECT_ITEMS_BLOCK
,
_
(
"Select Items"
),
green_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_COPY_BLOCK
,
_
(
"Copy Block"
),
copyblock_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_
INVERT
_BLOCK
,
_
(
"Mirror Block ||"
),
mirror_H_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_
MIRROR_Y
_BLOCK
,
_
(
"Mirror Block ||"
),
mirror_H_xpm
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_DELETE_BLOCK
,
_
(
"Delete Block"
),
delete_xpm
);
}
...
...
eeschema/libframe.cpp
View file @
2be6520a
...
...
@@ -414,7 +414,7 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_DELETE_BLOCK
:
case
ID_POPUP_COPY_BLOCK
:
case
ID_POPUP_SELECT_ITEMS_BLOCK
:
case
ID_POPUP_
INVERT
_BLOCK
:
case
ID_POPUP_
MIRROR_Y
_BLOCK
:
case
ID_POPUP_PLACE_BLOCK
:
case
ID_POPUP_LIBEDIT_DELETE_CURRENT_POLY_SEGMENT
:
case
ID_POPUP_LIBEDIT_ROTATE_GRAPHIC_TEXT
:
...
...
@@ -783,9 +783,9 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
HandleBlockEnd
(
&
dc
);
break
;
case
ID_POPUP_
INVERT
_BLOCK
:
case
ID_POPUP_
MIRROR_Y
_BLOCK
:
DrawPanel
->
m_AutoPAN_Request
=
false
;
GetScreen
()
->
m_BlockLocate
.
m_Command
=
BLOCK_
INVERT
;
GetScreen
()
->
m_BlockLocate
.
m_Command
=
BLOCK_
MIRROR_Y
;
DrawPanel
->
MouseToCursorSchema
();
HandleBlockPlace
(
&
dc
);
break
;
...
...
gerbview/block.cpp
View file @
2be6520a
...
...
@@ -108,7 +108,7 @@ void WinEDA_GerberFrame::HandleBlockPlace( wxDC* DC )
case
BLOCK_ZOOM
:
// Handle by HandleBlockEnd()
case
BLOCK_ROTATE
:
case
BLOCK_
INVERT
:
case
BLOCK_
FLIP
:
case
BLOCK_DELETE
:
case
BLOCK_SAVE
:
case
BLOCK_ABORT
:
...
...
@@ -183,7 +183,7 @@ int WinEDA_GerberFrame::HandleBlockEnd( wxDC* DC )
case
BLOCK_ROTATE
:
/* Unused */
break
;
case
BLOCK_
INVERT
:
/* Fip
*/
case
BLOCK_
FLIP
:
/* Flip, unused
*/
break
;
case
BLOCK_SAVE
:
/* Save (not used)*/
...
...
gerbview/edit.cpp
View file @
2be6520a
...
...
@@ -96,7 +96,7 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_DELETE_BLOCK
:
case
ID_POPUP_PLACE_BLOCK
:
case
ID_POPUP_ZOOM_BLOCK
:
case
ID_POPUP_
INVERT
_BLOCK
:
case
ID_POPUP_
FLIP
_BLOCK
:
case
ID_POPUP_ROTATE_BLOCK
:
case
ID_POPUP_COPY_BLOCK
:
break
;
...
...
@@ -144,29 +144,16 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_PCB_GLOBAL_DELETE
:
Erase_Current_Layer
(
TRUE
);
break
;
case
ID_GET_TOOLS
:
case
ID_GET_TOOLS
:
// InstallToolsFrame(this, wxPoint(-1,-1) );
break
;
case
ID_FIND_ITEMS
:
// InstallFindFrame(this, pos);
break
;
case
ID_BUS_BUTT
:
SetToolID
(
id
,
wxCURSOR_PENCIL
,
wxT
(
"Add Tracks"
)
);
break
;
case
ID_LINE_COMMENT_BUTT
:
SetToolID
(
id
,
wxCURSOR_PENCIL
,
wxT
(
"Add Drawing"
)
);
break
;
case
ID_TEXT_COMMENT_BUTT
:
SetToolID
(
id
,
wxCURSOR_PENCIL
,
wxT
(
"Add Text"
)
);
break
;
case
ID_NO_SELECT_BUTT
:
SetToolID
(
0
,
0
,
wxEmptyString
);
break
;
...
...
@@ -178,12 +165,6 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_CANCEL_CURRENT_COMMAND
:
break
;
case
ID_POPUP_END_LINE
:
DrawPanel
->
MouseToCursorSchema
();
// EndSegment(&dc);
break
;
case
ID_POPUP_PCB_DELETE_TRACKSEG
:
DrawPanel
->
MouseToCursorSchema
();
if
(
GetScreen
()
->
GetCurItem
()
==
NULL
)
...
...
@@ -198,7 +179,7 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_TOOLBARH_PCB_SELECT_LAYER
:
((
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
=
m_SelLayerBox
->
GetChoice
();
GetScreen
(
)
->
m_Active_Layer
=
m_SelLayerBox
->
GetChoice
();
DrawPanel
->
Refresh
(
TRUE
);
break
;
...
...
@@ -283,11 +264,7 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
void
WinEDA_GerberFrame
::
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
/**************************************************************************/
/* Appel� sur un double click:
* pour un �l�ment editable (textes, composant):
* appel de l'editeur correspondant.
* pour une connexion en cours:
* termine la connexion
/* Called on a double click:
*/
{
EDA_BaseStruct
*
DrawStruct
=
GetScreen
()
->
GetCurItem
();
...
...
@@ -305,11 +282,7 @@ void WinEDA_GerberFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break
;
// end case 0
case
ID_BUS_BUTT
:
case
ID_WIRE_BUTT
:
// if ( DrawStruct && (DrawStruct->m_Flags & IS_NEW) )
// EndSegment(DC);
default
:
break
;
}
}
include/block_commande.h
View file @
2be6520a
...
...
@@ -40,7 +40,7 @@ typedef enum {
BLOCK_PASTE
,
BLOCK_DRAG
,
BLOCK_ROTATE
,
BLOCK_
INVERT
,
BLOCK_
FLIP
,
BLOCK_ZOOM
,
BLOCK_ABORT
,
BLOCK_PRESELECT_MOVE
,
...
...
include/id.h
View file @
2be6520a
...
...
@@ -179,7 +179,7 @@ enum main_id {
ID_POPUP_COPY_BLOCK
,
ID_POPUP_ROTATE_BLOCK
,
ID_POPUP_DELETE_BLOCK
,
ID_POPUP_
INVERT
_BLOCK
,
ID_POPUP_
FLIP
_BLOCK
,
ID_POPUP_PLACE_BLOCK
,
ID_POPUP_ZOOM_BLOCK
,
ID_POPUP_SELECT_ITEMS_BLOCK
,
...
...
@@ -433,7 +433,6 @@ enum main_id {
ID_LIBEDIT_END_V_TOOL
,
// End Id pour VToolBar de Libedit
// ID pour CVPCB
ID_CVPCB_START_TOOL
,
ID_CVPCB_QUIT
,
ID_CVPCB_READ_INPUT_NETLIST
,
ID_CVPCB_SAVEQUITCVPCB
,
...
...
@@ -443,9 +442,6 @@ enum main_id {
ID_CVPCB_GOTO_PREVIOUSNA
,
ID_CVPCB_DEL_ASSOCIATIONS
,
ID_CVPCB_AUTO_ASSOCIE
,
ID_CVPCB_DISPLAY_HELP
,
ID_CVPCB_DISPLAY_LICENCE
,
ID_CVPCB_END_TOOL
,
ID_CVPCB_COMPONENT_LIST
,
ID_CVPCB_FOOTPRINT_LIST
,
ID_CVPCB_CREATE_STUFF_FILE
,
...
...
@@ -455,8 +451,6 @@ enum main_id {
ID_CVPCB_CONFIG_KEEP_OPEN_ON_SAVE
,
ID_CVPCB_UNUSED0
,
ID_CVPCB_UNUSED1
,
ID_CVPCB_UNUSED2
,
ID_CVPCB_UNUSED3
,
// id specifiques pcbnew
ID_LOAD_FILE
,
...
...
@@ -752,17 +746,14 @@ enum main_id {
ID_MODEDIT_TRANSFORM_MODULE
,
ID_MODEDIT_MODULE_ROTATE
,
ID_MODEDIT_MODULE_MIRROR
,
ID_MODEDIT_MODULE_SCALE
,
ID_MODEDIT_MODULE_SCALEX
,
ID_MODEDIT_MODULE_SCALEY
,
ID_MODEDIT_UNDO
,
ID_MODEDIT_REDO
,
ID_MODEDIT_IMPORT_PART
,
ID_MODEDIT_EXPORT_PART
,
ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART
,
ID_MODEDIT_UNUSED
6
,
ID_MODEDIT_UNUSED
7
,
ID_MODEDIT_UNUSED
8
,
ID_MODEDIT_UNUSED
0
,
ID_MODEDIT_UNUSED
1
,
ID_MODEDIT_UNUSED
2
,
// For GERBVIEW only /////////////////
ID_GERBVIEW_SHOW_LIST_DCODES
,
...
...
pcbnew/block.cpp
View file @
2be6520a
...
...
@@ -235,7 +235,7 @@ int WinEDA_PcbFrame::ReturnBlockCommand( int key )
break
;
case
GR_KB_ALT
:
cmd
=
BLOCK_
INVERT
;
cmd
=
BLOCK_
FLIP
;
break
;
case
MOUSE_MIDDLE
:
...
...
@@ -357,7 +357,7 @@ int WinEDA_PcbFrame::HandleBlockEnd( wxDC* DC )
Block_Rotate
();
break
;
case
BLOCK_
INVERT
:
/* Flip */
case
BLOCK_
FLIP
:
/* Flip */
// Turn off the block rectangle now so it is not redisplayed
DrawPanel
->
ManageCurseur
=
NULL
;
...
...
pcbnew/block_module_editor.cpp
View file @
2be6520a
...
...
@@ -152,7 +152,7 @@ int WinEDA_ModuleEditFrame::HandleBlockEnd( wxDC* DC )
case
BLOCK_DELETE
:
/* Delete */
ItemsCount
=
MarkItemsInBloc
(
Currentmodule
,
GetScreen
()
->
m_BlockLocate
);
if
(
ItemsCount
)
SaveCopyInUndoList
(
Currentmodule
,
UR_
CHANGED
);
SaveCopyInUndoList
(
Currentmodule
,
UR_
MODEDIT
);
DeleteMarkedItems
(
Currentmodule
);
break
;
...
...
@@ -163,17 +163,17 @@ int WinEDA_ModuleEditFrame::HandleBlockEnd( wxDC* DC )
case
BLOCK_ROTATE
:
ItemsCount
=
MarkItemsInBloc
(
Currentmodule
,
GetScreen
()
->
m_BlockLocate
);
if
(
ItemsCount
)
SaveCopyInUndoList
(
Currentmodule
,
UR_
CHANGED
);
SaveCopyInUndoList
(
Currentmodule
,
UR_
MODEDIT
);
RotateMarkedItems
(
Currentmodule
,
GetScreen
()
->
m_BlockLocate
.
Centre
()
);
break
;
case
BLOCK_MIRROR_X
:
case
BLOCK_MIRROR_Y
:
case
BLOCK_
INVERT
:
/* mirror */
case
BLOCK_
FLIP
:
/* mirror */
ItemsCount
=
MarkItemsInBloc
(
Currentmodule
,
GetScreen
()
->
m_BlockLocate
);
if
(
ItemsCount
)
SaveCopyInUndoList
(
Currentmodule
,
UR_
CHANGED
);
SaveCopyInUndoList
(
Currentmodule
,
UR_
MODEDIT
);
MirrorMarkedItems
(
Currentmodule
,
GetScreen
()
->
m_BlockLocate
.
Centre
()
);
break
;
...
...
@@ -240,14 +240,14 @@ void WinEDA_ModuleEditFrame::HandleBlockPlace( wxDC* DC )
case
BLOCK_MOVE
:
/* Move */
case
BLOCK_PRESELECT_MOVE
:
/* Move with preselection list*/
GetScreen
()
->
m_BlockLocate
.
ClearItemsList
();
SaveCopyInUndoList
(
Currentmodule
,
UR_
CHANGED
);
SaveCopyInUndoList
(
Currentmodule
,
UR_
MODEDIT
);
MoveMarkedItems
(
Currentmodule
,
GetScreen
()
->
m_BlockLocate
.
m_MoveVector
);
DrawPanel
->
Refresh
(
TRUE
);
break
;
case
BLOCK_COPY
:
/* Copy */
GetScreen
()
->
m_BlockLocate
.
ClearItemsList
();
SaveCopyInUndoList
(
Currentmodule
,
UR_
CHANGED
);
SaveCopyInUndoList
(
Currentmodule
,
UR_
MODEDIT
);
CopyMarkedItems
(
Currentmodule
,
GetScreen
()
->
m_BlockLocate
.
m_MoveVector
);
break
;
...
...
@@ -257,13 +257,13 @@ void WinEDA_ModuleEditFrame::HandleBlockPlace( wxDC* DC )
case
BLOCK_MIRROR_X
:
case
BLOCK_MIRROR_Y
:
case
BLOCK_
INVERT
:
/* Mirror by popup menu, from block move */
SaveCopyInUndoList
(
Currentmodule
,
UR_
CHANGED
);
case
BLOCK_
FLIP
:
/* Mirror by popup menu, from block move */
SaveCopyInUndoList
(
Currentmodule
,
UR_
MODEDIT
);
MirrorMarkedItems
(
Currentmodule
,
GetScreen
()
->
m_BlockLocate
.
Centre
()
);
break
;
case
BLOCK_ROTATE
:
SaveCopyInUndoList
(
Currentmodule
,
UR_
CHANGED
);
SaveCopyInUndoList
(
Currentmodule
,
UR_
MODEDIT
);
RotateMarkedItems
(
Currentmodule
,
GetScreen
()
->
m_BlockLocate
.
Centre
()
);
break
;
...
...
@@ -348,10 +348,7 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC,
}
/* Redessin nouvel affichage */
PtBlock
->
m_MoveVector
.
x
=
screen
->
m_Curseur
.
x
-
PtBlock
->
m_BlockLastCursorPosition
.
x
;
PtBlock
->
m_MoveVector
.
y
=
screen
->
m_Curseur
.
y
-
PtBlock
->
m_BlockLastCursorPosition
.
y
;
PtBlock
->
m_MoveVector
=
screen
->
m_Curseur
-
PtBlock
->
m_BlockLastCursorPosition
;
PtBlock
->
Draw
(
panel
,
DC
,
PtBlock
->
m_MoveVector
,
g_XorMode
,
PtBlock
->
m_Color
);
...
...
@@ -359,8 +356,7 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC,
if
(
Currentmodule
)
{
item
=
Currentmodule
->
m_Drawings
;
move_offset
.
x
=
-
PtBlock
->
m_MoveVector
.
x
;
move_offset
.
y
=
-
PtBlock
->
m_MoveVector
.
y
;
move_offset
=
-
PtBlock
->
m_MoveVector
;
for
(
;
item
!=
NULL
;
item
=
item
->
Next
()
)
{
if
(
item
->
m_Selected
==
0
)
...
...
@@ -552,8 +548,8 @@ void MirrorMarkedItems( MODULE* module, wxPoint offset )
continue
;
SETMIRROR
(
pad
->
GetPosition
().
x
);
pad
->
m_Pos0
.
x
=
pad
->
GetPosition
().
x
;
pad
->
m_Offset
.
x
=
-
pad
->
m_Offset
.
x
;
pad
->
m_DeltaSize
.
x
=
-
pad
->
m_DeltaSize
.
x
;
NEGATE
(
pad
->
m_Offset
.
x
)
;
NEGATE
(
pad
->
m_DeltaSize
.
x
)
;
pad
->
m_Orient
=
1800
-
pad
->
m_Orient
;
NORMALIZE_ANGLE
(
pad
->
m_Orient
);
}
...
...
@@ -567,14 +563,13 @@ void MirrorMarkedItems( MODULE* module, wxPoint offset )
switch
(
item
->
Type
()
)
{
case
TYPE_EDGE_MODULE
:
SETMIRROR
(
(
(
EDGE_MODULE
*
)
item
)
->
m_Start
.
x
);
(
(
EDGE_MODULE
*
)
item
)
->
m_Start0
.
x
=
(
(
EDGE_MODULE
*
)
item
)
->
m_Start
.
x
;
SETMIRROR
(
(
(
EDGE_MODULE
*
)
item
)
->
m_End
.
x
);
(
(
EDGE_MODULE
*
)
item
)
->
m_End0
.
x
=
(
(
EDGE_MODULE
*
)
item
)
->
m_End
.
x
;
(
(
EDGE_MODULE
*
)
item
)
->
m_Angle
=
-
(
(
EDGE_MODULE
*
)
item
)
->
m_Angle
;
{
EDGE_MODULE
*
edge
=
(
EDGE_MODULE
*
)
item
;
SETMIRROR
(
edge
->
m_Start
.
x
);
edge
->
m_Start0
.
x
=
edge
->
m_Start
.
x
;
SETMIRROR
(
edge
->
m_End
.
x
);
edge
->
m_End0
.
x
=
edge
->
m_End
.
x
;
NEGATE
(
edge
->
m_Angle
);
}
break
;
case
TYPE_TEXTE_MODULE
:
...
...
@@ -584,10 +579,11 @@ void MirrorMarkedItems( MODULE* module, wxPoint offset )
break
;
default
:
;
break
;
}
item
->
m_Flags
=
item
->
m_Selected
=
0
;
item
->
m_Flags
=
0
;
item
->
m_Selected
=
0
;
}
}
...
...
pcbnew/edit.cpp
View file @
2be6520a
...
...
@@ -122,7 +122,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_DELETE_BLOCK
:
case
ID_POPUP_PLACE_BLOCK
:
case
ID_POPUP_ZOOM_BLOCK
:
case
ID_POPUP_
INVERT
_BLOCK
:
case
ID_POPUP_
FLIP
_BLOCK
:
case
ID_POPUP_ROTATE_BLOCK
:
case
ID_POPUP_COPY_BLOCK
:
case
ID_POPUP_PCB_VIA_EDITING
:
...
...
@@ -296,8 +296,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
HandleBlockEnd
(
&
dc
);
break
;
case
ID_POPUP_
INVERT
_BLOCK
:
GetScreen
()
->
m_BlockLocate
.
m_Command
=
BLOCK_
INVERT
;
case
ID_POPUP_
FLIP
_BLOCK
:
GetScreen
()
->
m_BlockLocate
.
m_Command
=
BLOCK_
FLIP
;
GetScreen
()
->
m_BlockLocate
.
SetMessageBlock
(
this
);
HandleBlockEnd
(
&
dc
);
break
;
...
...
pcbnew/modedit.cpp
View file @
2be6520a
...
...
@@ -175,7 +175,6 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_DELETE_BLOCK
:
case
ID_POPUP_PLACE_BLOCK
:
case
ID_POPUP_ZOOM_BLOCK
:
case
ID_POPUP_MIRROR_Y_BLOCK
:
case
ID_POPUP_MIRROR_X_BLOCK
:
case
ID_POPUP_ROTATE_BLOCK
:
case
ID_POPUP_COPY_BLOCK
:
...
...
@@ -309,6 +308,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
pcbframe
->
Place_Module
(
newmodule
,
NULL
);
pcbframe
->
GetScreen
()
->
m_Curseur
=
cursor_pos
;
newmodule
->
m_TimeStamp
=
GetTimeStamp
();
pcbframe
->
SaveCopyInUndoList
(
newmodule
,
UR_NEW
);
}
newmodule
->
m_Flags
=
0
;
...
...
@@ -601,9 +601,6 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_MODEDIT_MODULE_ROTATE
:
case
ID_MODEDIT_MODULE_MIRROR
:
case
ID_MODEDIT_MODULE_SCALE
:
case
ID_MODEDIT_MODULE_SCALEX
:
case
ID_MODEDIT_MODULE_SCALEY
:
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
,
UR_MODEDIT
);
Transform
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
id
);
redraw
=
true
;
...
...
@@ -677,9 +674,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_POPUP_MIRROR_X_BLOCK
:
case
ID_POPUP_MIRROR_Y_BLOCK
:
case
ID_POPUP_INVERT_BLOCK
:
GetScreen
()
->
m_BlockLocate
.
m_Command
=
BLOCK_INVERT
;
GetScreen
()
->
m_BlockLocate
.
m_Command
=
BLOCK_MIRROR_X
;
GetScreen
()
->
m_BlockLocate
.
SetMessageBlock
(
this
);
{
SET_DC
;
...
...
@@ -761,25 +756,25 @@ void WinEDA_ModuleEditFrame::Transform( MODULE* module, int transform )
case
ID_MODEDIT_MODULE_MIRROR
:
for
(
;
pad
!=
NULL
;
pad
=
(
D_PAD
*
)
pad
->
Next
()
)
{
pad
->
m_Pos
.
y
=
-
pad
->
m_Pos
.
y
;
pad
->
m_Pos0
.
y
=
-
pad
->
m_Pos0
.
y
;
pad
->
m_Offset
.
y
=
-
pad
->
m_Offset
.
y
;
pad
->
m_DeltaSize
.
y
=
-
pad
->
m_DeltaSize
.
y
;
NEGATE
(
pad
->
m_Pos
.
y
)
;
NEGATE
(
pad
->
m_Pos0
.
y
)
;
NEGATE
(
pad
->
m_Offset
.
y
)
;
NEGATE
(
pad
->
m_DeltaSize
.
y
)
;
if
(
pad
->
m_Orient
)
pad
->
m_Orient
=
3600
-
pad
->
m_Orient
;
}
/* Inversion miroir de la Reference */
textmod
=
module
->
m_Reference
;
textmod
->
m_Pos
.
y
=
-
textmod
->
m_Pos
.
y
;
textmod
->
m_Pos0
.
y
=
textmod
->
m_Pos0
.
y
;
NEGATE
(
textmod
->
m_Pos
.
y
)
;
NEGATE
(
textmod
->
m_Pos0
.
y
)
;
if
(
textmod
->
m_Orient
)
textmod
->
m_Orient
=
3600
-
textmod
->
m_Orient
;
/* Inversion miroir de la Valeur */
textmod
=
module
->
m_Value
;
textmod
->
m_Pos
.
y
=
-
textmod
->
m_Pos
.
y
;
textmod
->
m_Pos0
.
y
=
textmod
->
m_Pos0
.
y
;
NEGATE
(
textmod
->
m_Pos
.
y
)
;
NEGATE
(
textmod
->
m_Pos0
.
y
)
;
if
(
textmod
->
m_Orient
)
textmod
->
m_Orient
=
3600
-
textmod
->
m_Orient
;
...
...
@@ -791,18 +786,18 @@ void WinEDA_ModuleEditFrame::Transform( MODULE* module, int transform )
{
case
TYPE_EDGE_MODULE
:
edgemod
=
(
EDGE_MODULE
*
)
PtStruct
;
edgemod
->
m_Start
.
y
=
-
edgemod
->
m_Start
.
y
;
edgemod
->
m_End
.
y
=
-
edgemod
->
m_End
.
y
;
NEGATE
(
edgemod
->
m_Start
.
y
)
;
NEGATE
(
edgemod
->
m_End
.
y
)
;
/* inversion des coords locales */
edgemod
->
m_Start0
.
y
=
-
edgemod
->
m_Start0
.
y
;
edgemod
->
m_End0
.
y
=
-
edgemod
->
m_End0
.
y
;
NEGATE
(
edgemod
->
m_Start0
.
y
)
;
NEGATE
(
edgemod
->
m_End0
.
y
)
;
break
;
case
TYPE_TEXTE_MODULE
:
/* Inversion miroir de la position et mise en miroir : */
textmod
=
(
TEXTE_MODULE
*
)
PtStruct
;
textmod
->
m_Pos
.
y
=
-
textmod
->
m_Pos
.
y
;
textmod
->
m_Pos0
.
y
=
textmod
->
m_Pos0
.
y
;
NEGATE
(
textmod
->
m_Pos
.
y
)
;
NEGATE
(
textmod
->
m_Pos0
.
y
)
;
if
(
textmod
->
m_Orient
)
textmod
->
m_Orient
=
3600
-
textmod
->
m_Orient
;
break
;
...
...
@@ -815,9 +810,7 @@ void WinEDA_ModuleEditFrame::Transform( MODULE* module, int transform )
break
;
case
ID_MODEDIT_MODULE_SCALE
:
case
ID_MODEDIT_MODULE_SCALEX
:
case
ID_MODEDIT_MODULE_SCALEY
:
default
:
DisplayInfoMessage
(
this
,
wxT
(
"Not availlable"
)
);
break
;
}
...
...
pcbnew/modedit_onclick.cpp
View file @
2be6520a
...
...
@@ -248,11 +248,6 @@ bool WinEDA_ModuleEditFrame::OnRightClick( const wxPoint& MousePos,
_
(
"Rotate"
),
rotate_module_pos_xpm
);
ADD_MENUITEM
(
transform_choice
,
ID_MODEDIT_MODULE_MIRROR
,
_
(
"Mirror"
),
mirror_H_xpm
);
#if 0
transform_choice->Append( ID_MODEDIT_MODULE_SCALE, _( "Scale" ) );
transform_choice->Append( ID_MODEDIT_MODULE_SCALE, _( "Scale X" ) );
transform_choice->Append( ID_MODEDIT_MODULE_SCALE, _( "Scale Y" ) );
#endif
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_PCB_EDIT_MODULE
,
_
(
"Edit Module"
),
edit_module_xpm
);
ADD_MENUITEM_WITH_SUBMENU
(
PopMenu
,
transform_choice
,
...
...
pcbnew/moduleframe.cpp
View file @
2be6520a
...
...
@@ -113,24 +113,18 @@ BEGIN_EVENT_TABLE( WinEDA_ModuleEditFrame, WinEDA_BasePcbFrame )
EVT_TOOL_RANGE
(
ID_TB_OPTIONS_START
,
ID_TB_OPTIONS_END
,
WinEDA_ModuleEditFrame
::
OnSelectOptionToolbar
)
// popup commands
EVT_MENU_RANGE
(
ID_POPUP_PCB_START_RANGE
,
ID_POPUP_PCB_END_RANGE
,
WinEDA_ModuleEditFrame
::
Process_Special_Functions
)
// Annulation de commande en cours
EVT_MENU_RANGE
(
ID_POPUP_GENERAL_START_RANGE
,
ID_POPUP_GENERAL_END_RANGE
,
WinEDA_
Pcb
Frame
::
Process_Special_Functions
)
WinEDA_
ModuleEdit
Frame
::
Process_Special_Functions
)
// Transformations du module
EVT_MENU
(
ID_MODEDIT_MODULE_ROTATE
,
WinEDA_ModuleEditFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_MODEDIT_MODULE_MIRROR
,
WinEDA_ModuleEditFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_MODEDIT_MODULE_SCALE
,
WinEDA_ModuleEditFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_MODEDIT_MODULE_SCALEX
,
WinEDA_ModuleEditFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_MODEDIT_MODULE_SCALEY
,
WinEDA_ModuleEditFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_PCB_DRAWINGS_WIDTHS_SETUP
,
WinEDA_ModuleEditFrame
::
Process_Special_Functions
)
...
...
pcbnew/onrightclick.cpp
View file @
2be6520a
...
...
@@ -394,7 +394,7 @@ void WinEDA_PcbFrame::createPopUpBlockMenu( wxMenu* menu )
_
(
"Place Block"
),
apply_xpm
);
ADD_MENUITEM
(
menu
,
ID_POPUP_COPY_BLOCK
,
_
(
"Copy Block"
),
copyblock_xpm
);
ADD_MENUITEM
(
menu
,
ID_POPUP_
INVERT
_BLOCK
,
ADD_MENUITEM
(
menu
,
ID_POPUP_
FLIP
_BLOCK
,
_
(
"Flip Block"
),
invert_module_xpm
);
ADD_MENUITEM
(
menu
,
ID_POPUP_ROTATE_BLOCK
,
_
(
"Rotate Block"
),
rotate_pos_xpm
);
...
...
pcbnew/zones_test_and_combine_areas.cpp
View file @
2be6520a
/****************************************************************************/
/* Name: zones_
by_polygon.cpp
*/
/* Name: zones_
test_and_combine_areas.cpp
*/
/* Licence: GPL License */
/* functions to test, merges and cut polygons used as copper areas outlines */
/* functions to test, merge and cut polygons used as copper areas outlines */
/* some pieces of code come from FreePCB */
/****************************************************************************/
#include <vector>
...
...
@@ -11,11 +12,6 @@
#include "confirm.h"
#include "pcbnew.h"
using
namespace
std
;
#undef ASSERT
#define ASSERT wxASSERT
bool
bDontShowSelfIntersectionArcsWarning
;
bool
bDontShowSelfIntersectionWarning
;
bool
bDontShowIntersectionArcsWarning
;
...
...
@@ -685,7 +681,7 @@ int BOARD::CombineAreas( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_combi
{
if
(
area_ref
==
area_to_combine
)
{
ASSERT
(
0
);
wx
ASSERT
(
0
);
}
// polygons intersect, combine them
...
...
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