From 2a7e60960a8e90461f75ec7d28049387542ec637 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 16 Feb 2021 20:45:25 +0000 Subject: [PATCH] Use standard mirror icons & terminology. Also use standard group icons. Also put both (and rotate commands) in toolbar. Fixes https://gitlab.com/kicad/code/kicad/issues/7504 --- bitmaps_png/CMakeLists.txt | 3 +- bitmaps_png/cpp_24/group.cpp | 30 ++- bitmaps_png/cpp_24/mirror_h.cpp | 52 +++-- bitmaps_png/cpp_24/mirror_v.cpp | 49 +++-- bitmaps_png/cpp_24/ungroup.cpp | 37 ++++ .../include/bitmaps_png/bitmaps_list.h | 3 +- bitmaps_png/sources/group.svg | 31 ++- bitmaps_png/sources/group_ungroup.svg | 199 ------------------ bitmaps_png/sources/mirror_h.svg | 44 ++-- bitmaps_png/sources/mirror_v.svg | 46 ++-- .../sources/{group_add.svg => ungroup.svg} | 136 ++++++------ eeschema/sch_bitmap.cpp | 8 +- eeschema/sch_bitmap.h | 4 +- eeschema/sch_bus_entry.cpp | 8 +- eeschema/sch_bus_entry.h | 4 +- eeschema/sch_component.cpp | 8 +- eeschema/sch_component.h | 6 +- eeschema/sch_field.h | 8 +- eeschema/sch_item.h | 17 +- eeschema/sch_junction.cpp | 8 +- eeschema/sch_junction.h | 4 +- eeschema/sch_line.cpp | 12 +- eeschema/sch_line.h | 4 +- eeschema/sch_marker.cpp | 4 +- eeschema/sch_marker.h | 4 +- eeschema/sch_no_connect.cpp | 8 +- eeschema/sch_no_connect.h | 4 +- eeschema/sch_pin.h | 4 +- .../sch_plugins/eagle/sch_eagle_plugin.cpp | 2 +- eeschema/sch_sheet.cpp | 12 +- eeschema/sch_sheet.h | 8 +- eeschema/sch_sheet_path.cpp | 4 +- eeschema/sch_sheet_pin.cpp | 12 +- eeschema/sch_text.cpp | 16 +- eeschema/sch_text.h | 12 +- .../symbol_editor/toolbars_symbol_editor.cpp | 6 + eeschema/toolbars_sch_editor.cpp | 6 + eeschema/tools/ee_actions.cpp | 12 +- eeschema/tools/ee_actions.h | 4 +- eeschema/tools/sch_drawing_tools.cpp | 12 +- eeschema/tools/sch_edit_tool.cpp | 60 +++--- eeschema/tools/symbol_editor_edit_tool.cpp | 18 +- pcbnew/toolbars_footprint_editor.cpp | 7 + pcbnew/toolbars_pcb_editor.cpp | 8 + pcbnew/tools/group_tool.cpp | 20 +- pcbnew/tools/pcb_actions.cpp | 10 +- pcbnew/tools/pcb_actions.h | 6 +- 47 files changed, 449 insertions(+), 531 deletions(-) create mode 100644 bitmaps_png/cpp_24/ungroup.cpp delete mode 100755 bitmaps_png/sources/group_ungroup.svg rename bitmaps_png/sources/{group_add.svg => ungroup.svg} (65%) diff --git a/bitmaps_png/CMakeLists.txt b/bitmaps_png/CMakeLists.txt index a5395a4500..148922febe 100644 --- a/bitmaps_png/CMakeLists.txt +++ b/bitmaps_png/CMakeLists.txt @@ -264,11 +264,9 @@ set( BMAPS_MID grid_select_axis grid group - group_add group_enter group_leave group_remove - group_ungroup help help_online hidden_pin @@ -454,6 +452,7 @@ set( BMAPS_MID tools trash undo + ungroup unit_inch unit_mil unit_mm diff --git a/bitmaps_png/cpp_24/group.cpp b/bitmaps_png/cpp_24/group.cpp index 13933cdcc8..2a852d1788 100644 --- a/bitmaps_png/cpp_24/group.cpp +++ b/bitmaps_png/cpp_24/group.cpp @@ -7,13 +7,29 @@ static const unsigned char png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, - 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x08, 0x04, 0x00, 0x00, 0x00, 0x4a, 0x7e, 0xf5, - 0x73, 0x00, 0x00, 0x00, 0x47, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x63, 0x60, 0x20, 0x11, 0x30, - 0x32, 0x30, 0x84, 0xfc, 0x87, 0x30, 0xd7, 0x30, 0xe2, 0x56, 0x86, 0x50, 0x83, 0xa4, 0x01, 0xa2, - 0x05, 0xc2, 0xc3, 0xc6, 0xc2, 0xd0, 0x40, 0x9c, 0x0d, 0x4c, 0x0c, 0xe4, 0x00, 0x84, 0x95, 0x94, - 0xab, 0xa2, 0x12, 0x20, 0xc5, 0x49, 0x24, 0x7b, 0x9a, 0x89, 0x61, 0x70, 0x82, 0x51, 0x4f, 0x13, - 0x50, 0x45, 0xfb, 0xfc, 0x40, 0xfb, 0x2c, 0x4a, 0x72, 0x00, 0x01, 0x00, 0xd8, 0x01, 0x2a, 0xab, - 0x7b, 0x63, 0xa1, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x08, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x77, 0x3d, + 0xf8, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc3, 0x00, 0x00, 0x0e, + 0xc3, 0x01, 0xc7, 0x6f, 0xa8, 0x64, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, + 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x00, 0x0d, 0x74, + 0x45, 0x58, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x00, 0x61, 0x64, 0x64, 0x5f, 0x61, 0x72, 0x63, + 0x16, 0x64, 0x63, 0xf9, 0x00, 0x00, 0x00, 0x52, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x70, 0x79, + 0x72, 0x69, 0x67, 0x68, 0x74, 0x00, 0x43, 0x43, 0x20, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x53, 0x68, 0x61, 0x72, 0x65, 0x41, 0x6c, 0x69, 0x6b, 0x65, 0x20, + 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, + 0x73, 0x65, 0x73, 0x2f, 0x62, 0x79, 0x2d, 0x73, 0x61, 0x2f, 0x34, 0x2e, 0x30, 0x2f, 0xc3, 0x54, + 0x62, 0x05, 0x00, 0x00, 0x00, 0x91, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xe5, 0x55, 0x41, 0x0e, + 0xc0, 0x20, 0x08, 0xc3, 0x65, 0x4f, 0xe4, 0x99, 0xfe, 0xd1, 0x9d, 0x46, 0x98, 0xa9, 0x04, 0x49, + 0xea, 0x65, 0x3d, 0x22, 0xb6, 0x80, 0x08, 0x22, 0x64, 0x34, 0x11, 0x11, 0x55, 0x1d, 0xde, 0xd8, + 0x7b, 0x6f, 0x15, 0x32, 0xc4, 0x73, 0x67, 0x1c, 0x67, 0x61, 0x7f, 0x8e, 0x6c, 0x1e, 0x50, 0x00, + 0x65, 0x80, 0x48, 0xe7, 0x3b, 0x48, 0xe4, 0x42, 0x02, 0x14, 0xac, 0x52, 0xcc, 0x9e, 0xaf, 0x7c, + 0x29, 0x19, 0xf8, 0x12, 0xd2, 0x4b, 0x44, 0x11, 0xa0, 0x97, 0xc8, 0xe3, 0xd3, 0xa6, 0x3b, 0x0f, + 0xf9, 0x1f, 0x58, 0x3b, 0xa9, 0xea, 0xc8, 0xce, 0xa0, 0x4c, 0x29, 0x5f, 0x2e, 0x38, 0x2a, 0x32, + 0x88, 0x82, 0x39, 0xda, 0x45, 0x26, 0x50, 0x1d, 0xd1, 0x69, 0x01, 0x16, 0x4c, 0x80, 0xf5, 0x07, + 0x4a, 0x1b, 0x6d, 0xd5, 0x71, 0x88, 0xe7, 0xec, 0xa8, 0xf0, 0x91, 0x44, 0xeb, 0x71, 0xb6, 0x47, + 0xa0, 0x2f, 0xfd, 0x0a, 0xcf, 0x16, 0x1e, 0x72, 0x17, 0x56, 0x14, 0xdd, 0x9c, 0x0e, 0xe4, 0x00, + 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; const BITMAP_OPAQUE group_xpm[1] = {{ png, sizeof( png ), "group_xpm" }}; diff --git a/bitmaps_png/cpp_24/mirror_h.cpp b/bitmaps_png/cpp_24/mirror_h.cpp index 1fd940cc20..2e0ae1dc7d 100644 --- a/bitmaps_png/cpp_24/mirror_h.cpp +++ b/bitmaps_png/cpp_24/mirror_h.cpp @@ -8,23 +8,41 @@ static const unsigned char png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x08, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x77, 0x3d, - 0xf8, 0x00, 0x00, 0x00, 0xf1, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xcd, 0x96, 0x41, 0x0a, 0xc2, - 0x30, 0x10, 0x45, 0x7b, 0x8e, 0x7a, 0xac, 0xf6, 0x2a, 0xea, 0x42, 0x6a, 0xa8, 0x2b, 0x8f, 0x94, - 0x74, 0x6b, 0xbd, 0x83, 0xa2, 0x28, 0x28, 0xea, 0x2d, 0x5a, 0xe7, 0x83, 0xa2, 0xc4, 0x34, 0x33, - 0x09, 0x11, 0x1a, 0xf8, 0x9b, 0x42, 0xff, 0xcb, 0x74, 0x98, 0x3f, 0xcd, 0xb2, 0x31, 0x9d, 0xa2, - 0x28, 0x2e, 0xd0, 0xdf, 0x00, 0x65, 0x59, 0xee, 0xa0, 0xa8, 0x97, 0x9b, 0xa6, 0xa9, 0x52, 0x5d, - 0x24, 0x5f, 0x6d, 0x67, 0x3f, 0x0f, 0x8d, 0x31, 0x9d, 0xd6, 0x7a, 0xc9, 0x54, 0xf0, 0x80, 0xbc, - 0xe6, 0xf5, 0x66, 0x9e, 0xd7, 0x6d, 0xe7, 0x04, 0x90, 0x7a, 0x1f, 0x84, 0xcc, 0x7b, 0xc8, 0x77, - 0x73, 0x32, 0xef, 0xbd, 0x00, 0x1f, 0x84, 0x1a, 0xbc, 0x87, 0x18, 0x73, 0x1e, 0xc0, 0x55, 0xc2, - 0x98, 0xcb, 0x00, 0x2e, 0x08, 0x7d, 0x9e, 0x3b, 0xc4, 0x98, 0xcb, 0x01, 0x36, 0xc4, 0xee, 0xc1, - 0x80, 0x79, 0x18, 0xe0, 0x1b, 0x42, 0xe6, 0x07, 0x88, 0x31, 0x0f, 0x07, 0xd8, 0x95, 0x30, 0xe6, - 0x71, 0x00, 0x1a, 0xc4, 0x35, 0xdd, 0xfe, 0x06, 0x91, 0xc1, 0x34, 0x29, 0x00, 0xe6, 0x76, 0x0f, - 0x18, 0x88, 0x1c, 0xf0, 0x36, 0x7f, 0xcd, 0xc1, 0x11, 0xfa, 0x4c, 0xed, 0x20, 0x44, 0x0c, 0x50, - 0x11, 0x33, 0x20, 0x06, 0x28, 0x47, 0x54, 0x5c, 0xa1, 0x14, 0x83, 0xa6, 0x42, 0xb3, 0x48, 0x1c, - 0x15, 0x4c, 0xd8, 0x9d, 0xa0, 0xe8, 0xb0, 0x0b, 0xc9, 0x1f, 0x06, 0xe2, 0x04, 0x2c, 0x04, 0x1b, - 0xcd, 0xd9, 0x03, 0xfb, 0x4c, 0xea, 0xb6, 0x8a, 0x5d, 0x99, 0xde, 0x7d, 0x90, 0x62, 0xe9, 0x9f, - 0xa1, 0x51, 0xfd, 0x89, 0x3c, 0x01, 0x32, 0xae, 0x1f, 0x99, 0x2d, 0xe3, 0x9e, 0xc7, 0x00, 0x00, - 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, + 0xf8, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc3, 0x00, 0x00, 0x0e, + 0xc3, 0x01, 0xc7, 0x6f, 0xa8, 0x64, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, + 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x00, 0x0d, 0x74, + 0x45, 0x58, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x00, 0x61, 0x64, 0x64, 0x5f, 0x61, 0x72, 0x63, + 0x16, 0x64, 0x63, 0xf9, 0x00, 0x00, 0x00, 0x52, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x70, 0x79, + 0x72, 0x69, 0x67, 0x68, 0x74, 0x00, 0x43, 0x43, 0x20, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x53, 0x68, 0x61, 0x72, 0x65, 0x41, 0x6c, 0x69, 0x6b, 0x65, 0x20, + 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, + 0x73, 0x65, 0x73, 0x2f, 0x62, 0x79, 0x2d, 0x73, 0x61, 0x2f, 0x34, 0x2e, 0x30, 0x2f, 0xc3, 0x54, + 0x62, 0x05, 0x00, 0x00, 0x01, 0x66, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xe5, 0xd4, 0xbf, 0x4a, + 0xc3, 0x50, 0x14, 0xc7, 0xf1, 0xef, 0x4d, 0x69, 0x91, 0xe2, 0x12, 0x44, 0xa4, 0x4d, 0x07, 0x8b, + 0x8e, 0x05, 0x67, 0x9d, 0xfd, 0x33, 0x5a, 0x37, 0xa5, 0x83, 0xa2, 0x28, 0x2a, 0x4a, 0xa5, 0x11, + 0x5c, 0x63, 0x07, 0xe7, 0x86, 0x40, 0xa1, 0xaf, 0x90, 0x97, 0xe8, 0x20, 0x16, 0x7d, 0x02, 0x9f, + 0xa0, 0xef, 0x50, 0x5a, 0x7b, 0x8f, 0x8b, 0x96, 0x96, 0xa6, 0x69, 0xd2, 0x16, 0x1c, 0x3c, 0x53, + 0x72, 0xef, 0xc9, 0xef, 0x43, 0x12, 0xce, 0x85, 0x7f, 0x53, 0xae, 0xeb, 0xee, 0xfc, 0x5e, 0x5b, + 0xd5, 0xb7, 0xed, 0xa8, 0xcf, 0x19, 0x51, 0x1b, 0x45, 0xc4, 0x1e, 0xba, 0xb1, 0x43, 0x5a, 0xe3, + 0x03, 0x9e, 0xe7, 0xe5, 0x81, 0xc3, 0x41, 0x3e, 0x14, 0x73, 0x4e, 0x6b, 0x73, 0x61, 0x80, 0xd6, + 0xda, 0x06, 0x12, 0x43, 0x4b, 0x09, 0x8d, 0x2e, 0x2f, 0x04, 0xa8, 0xd7, 0xeb, 0xa6, 0x88, 0x9c, + 0x8e, 0x6d, 0x28, 0xce, 0xad, 0x97, 0x8f, 0x95, 0xb9, 0x81, 0x6e, 0xb7, 0x7b, 0x03, 0x2c, 0x07, + 0x6c, 0xa5, 0x75, 0xaf, 0x77, 0x35, 0x17, 0xe0, 0x38, 0x4e, 0x0a, 0xb8, 0x9b, 0xb4, 0xaf, 0xa0, + 0xbc, 0xee, 0x34, 0x97, 0x66, 0x06, 0x4c, 0xd3, 0x2c, 0x01, 0x99, 0x90, 0x96, 0xb5, 0x9e, 0x91, + 0x3a, 0x9e, 0x19, 0xd0, 0x3a, 0xc2, 0x8f, 0x14, 0xb1, 0x11, 0x51, 0xb1, 0x81, 0x5a, 0xad, 0x76, + 0xa0, 0x94, 0xda, 0x9a, 0x9a, 0x0f, 0x85, 0xec, 0x73, 0x6b, 0x2f, 0x36, 0x00, 0x44, 0x1e, 0x26, + 0x8c, 0xc9, 0x83, 0x17, 0x08, 0xb8, 0xae, 0x5b, 0x00, 0x76, 0x23, 0x03, 0xc2, 0xbe, 0x55, 0x7d, + 0x0d, 0x7c, 0xdb, 0x40, 0x40, 0x6b, 0xfd, 0x08, 0x4c, 0xfc, 0xae, 0x81, 0x86, 0x56, 0x0f, 0x91, + 0x00, 0xcf, 0xf3, 0xb2, 0x4a, 0xa9, 0x93, 0x38, 0xe1, 0x00, 0x28, 0x4a, 0x96, 0xf3, 0x9e, 0x9b, + 0x0a, 0xf4, 0xfb, 0xfd, 0x7b, 0x20, 0x15, 0x1b, 0x80, 0x24, 0xea, 0xeb, 0x36, 0x14, 0x68, 0x34, + 0x1a, 0x69, 0xe0, 0x72, 0x86, 0x70, 0x00, 0x04, 0xae, 0x57, 0x9d, 0xe6, 0xc8, 0xd4, 0x8f, 0x00, + 0x9d, 0x4e, 0xe7, 0x02, 0x98, 0x7a, 0xbe, 0x84, 0x94, 0x99, 0x34, 0x92, 0x67, 0x81, 0x80, 0xef, + 0xfb, 0x09, 0x11, 0x89, 0x74, 0x42, 0x86, 0x96, 0x50, 0xc1, 0xf7, 0x07, 0x27, 0xef, 0x00, 0x68, + 0xb7, 0xdb, 0x47, 0xc0, 0xc6, 0xdc, 0x00, 0xe4, 0x33, 0x9f, 0x56, 0x71, 0x0c, 0x50, 0x4a, 0x55, + 0x16, 0x10, 0xfe, 0x13, 0x2a, 0x4f, 0x8b, 0xca, 0xfa, 0xfb, 0xfa, 0x06, 0x26, 0xf9, 0x62, 0x2f, + 0x68, 0xc5, 0xcd, 0x66, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; const BITMAP_OPAQUE mirror_h_xpm[1] = {{ png, sizeof( png ), "mirror_h_xpm" }}; diff --git a/bitmaps_png/cpp_24/mirror_v.cpp b/bitmaps_png/cpp_24/mirror_v.cpp index 1430b940f4..29660e1a76 100644 --- a/bitmaps_png/cpp_24/mirror_v.cpp +++ b/bitmaps_png/cpp_24/mirror_v.cpp @@ -8,20 +8,41 @@ static const unsigned char png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x08, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x77, 0x3d, - 0xf8, 0x00, 0x00, 0x00, 0xb8, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xdd, 0x92, 0x5b, 0x0e, 0xc2, - 0x20, 0x10, 0x45, 0xbb, 0x0e, 0x5c, 0x16, 0x6c, 0xc5, 0xf6, 0x47, 0xab, 0x74, 0x55, 0xc0, 0xaf, - 0x74, 0x13, 0x1a, 0x1f, 0x8d, 0xba, 0x0e, 0x1c, 0xcc, 0x68, 0xfc, 0x68, 0x9a, 0xa1, 0x30, 0x26, - 0x3a, 0xc9, 0xfd, 0xb8, 0x21, 0x9c, 0x13, 0x1e, 0x55, 0xf5, 0x57, 0x63, 0xad, 0x5d, 0x42, 0x42, - 0x4e, 0x8c, 0x31, 0xed, 0xa4, 0xc4, 0x39, 0x57, 0xb3, 0xc1, 0x73, 0x24, 0x64, 0xf8, 0x1c, 0x49, - 0x32, 0xfc, 0x35, 0xb0, 0xb1, 0x61, 0x83, 0x53, 0x24, 0x70, 0xca, 0x75, 0xa9, 0xdf, 0xb5, 0x65, - 0x83, 0x8f, 0x49, 0x8a, 0xc3, 0x3f, 0x1e, 0x5e, 0x83, 0x60, 0x95, 0xbc, 0x51, 0x29, 0x35, 0x40, - 0x02, 0xe4, 0x12, 0xbb, 0x94, 0xf2, 0x8c, 0x7d, 0xc0, 0xf5, 0x13, 0xf6, 0x2b, 0xf6, 0x23, 0xf6, - 0x1b, 0xf6, 0x03, 0xf6, 0x3b, 0xf6, 0x7d, 0x64, 0x7c, 0x4f, 0x40, 0x1d, 0xd1, 0xf5, 0xf5, 0x42, - 0x7b, 0x9e, 0xfb, 0x8f, 0x70, 0xa1, 0x7d, 0x78, 0xa6, 0xf3, 0x2d, 0x1f, 0xbc, 0xb4, 0x64, 0x14, - 0x5e, 0x4a, 0x32, 0x09, 0xcf, 0x95, 0x90, 0xe0, 0x73, 0x25, 0x42, 0xef, 0x1a, 0x32, 0xfc, 0x9d, - 0x7e, 0xc3, 0x08, 0x27, 0x4a, 0xf2, 0xe0, 0x89, 0x27, 0xf9, 0x99, 0x79, 0x00, 0x9c, 0xbd, 0x1f, - 0xc7, 0x22, 0x83, 0x1d, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, - 0x82, + 0xf8, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc3, 0x00, 0x00, 0x0e, + 0xc3, 0x01, 0xc7, 0x6f, 0xa8, 0x64, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, + 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x00, 0x0e, 0x74, + 0x45, 0x58, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x00, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x5f, + 0x68, 0x1c, 0x96, 0x58, 0x4c, 0x00, 0x00, 0x00, 0x52, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x70, + 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x00, 0x43, 0x43, 0x20, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x53, 0x68, 0x61, 0x72, 0x65, 0x41, 0x6c, 0x69, 0x6b, 0x65, + 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x62, 0x79, 0x2d, 0x73, 0x61, 0x2f, 0x34, 0x2e, 0x30, 0x2f, 0xc3, + 0x54, 0x62, 0x05, 0x00, 0x00, 0x01, 0x63, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xdd, 0x94, 0xc1, + 0x4a, 0x02, 0x51, 0x14, 0x86, 0xff, 0xa3, 0x33, 0x05, 0x2d, 0x7c, 0x80, 0xde, 0xa0, 0x27, 0x68, + 0xa8, 0x08, 0x5a, 0x35, 0x4f, 0xe0, 0xde, 0xbd, 0xca, 0xcc, 0x22, 0x18, 0x82, 0xcc, 0x36, 0x91, + 0x0c, 0x85, 0x22, 0x85, 0x42, 0x0b, 0x09, 0x5a, 0x44, 0x9b, 0x02, 0x71, 0xd5, 0xc2, 0x45, 0xd2, + 0xa2, 0x56, 0x45, 0x50, 0x6d, 0x6c, 0xa1, 0x86, 0x8b, 0x16, 0x09, 0xc6, 0x45, 0xf2, 0x9e, 0x16, + 0x35, 0x31, 0x0b, 0x91, 0x51, 0x67, 0xa0, 0xfa, 0x56, 0x07, 0xee, 0xbd, 0xff, 0x77, 0x39, 0xdc, + 0x7b, 0x80, 0xbf, 0x4e, 0xd8, 0x29, 0xb2, 0xd9, 0xec, 0x8d, 0xae, 0xeb, 0x42, 0xd3, 0xb4, 0xfb, + 0x6a, 0xb5, 0x2a, 0xfd, 0x12, 0x90, 0x4b, 0xc0, 0xdf, 0x65, 0x1d, 0x40, 0x51, 0x08, 0x51, 0xb0, + 0x2c, 0xeb, 0x2d, 0x08, 0x81, 0x43, 0x07, 0x40, 0x29, 0x14, 0x0a, 0xd9, 0xc9, 0x64, 0xb2, 0x11, + 0x84, 0xc0, 0xa1, 0x07, 0xe0, 0x1c, 0x80, 0x6d, 0x18, 0xc6, 0x75, 0x10, 0x02, 0x37, 0x35, 0x29, + 0x65, 0xc6, 0x34, 0xcd, 0x32, 0x11, 0x79, 0xd9, 0x3f, 0xb2, 0xe0, 0xeb, 0x10, 0xd1, 0x13, 0x80, + 0x83, 0x48, 0x24, 0x52, 0x8c, 0xc5, 0x62, 0xc2, 0x77, 0x81, 0x8b, 0x36, 0x33, 0x17, 0x54, 0x55, + 0xcd, 0xc7, 0xe3, 0xf1, 0xd7, 0x20, 0x04, 0x0e, 0x82, 0x99, 0x4f, 0x15, 0x45, 0xd9, 0x4e, 0x24, + 0x12, 0x0f, 0x41, 0x08, 0x1c, 0x24, 0x80, 0x0a, 0x33, 0xe7, 0x4c, 0xd3, 0xbc, 0xf0, 0x21, 0xef, + 0x17, 0xf0, 0xd3, 0xa2, 0xd9, 0xad, 0x4b, 0x7f, 0x5a, 0x44, 0x54, 0x01, 0xfa, 0x3b, 0xad, 0xd4, + 0x72, 0x0d, 0x00, 0x14, 0x1f, 0x42, 0x01, 0xa0, 0x4b, 0x4c, 0xc7, 0x1c, 0xe6, 0xbd, 0xd6, 0xc6, + 0xe2, 0xa3, 0x7b, 0x61, 0x52, 0x41, 0x1b, 0xe0, 0x02, 0xa9, 0x53, 0xf9, 0xe6, 0xfa, 0xfc, 0xc0, + 0x67, 0x3a, 0xae, 0xe0, 0x96, 0x89, 0xf7, 0xa7, 0xe5, 0xc7, 0xd1, 0x73, 0x7a, 0x65, 0xe8, 0x47, + 0x1b, 0x55, 0x50, 0x03, 0x38, 0xd3, 0x4a, 0x2d, 0x95, 0xe1, 0x71, 0x54, 0x78, 0x11, 0xf4, 0x08, + 0x74, 0x42, 0x44, 0x76, 0x23, 0xb5, 0x70, 0x07, 0x00, 0xd8, 0xf4, 0x7e, 0xa3, 0x61, 0x82, 0x0e, + 0x98, 0x4b, 0x04, 0xd5, 0x6e, 0xa6, 0xb5, 0xb1, 0xc7, 0xf5, 0x20, 0x41, 0x9d, 0xc1, 0x39, 0x39, + 0xf3, 0x7e, 0xd8, 0x5e, 0x5b, 0xed, 0x8e, 0x1b, 0x3c, 0x48, 0x70, 0xc5, 0xa0, 0xdd, 0x97, 0xb9, + 0xe6, 0x19, 0xa2, 0xd1, 0xfe, 0xa4, 0xc1, 0xff, 0x87, 0x4f, 0x3d, 0xf3, 0x8e, 0xc2, 0x6f, 0x6e, + 0xfd, 0xdd, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; const BITMAP_OPAQUE mirror_v_xpm[1] = {{ png, sizeof( png ), "mirror_v_xpm" }}; diff --git a/bitmaps_png/cpp_24/ungroup.cpp b/bitmaps_png/cpp_24/ungroup.cpp new file mode 100644 index 0000000000..5550985a7b --- /dev/null +++ b/bitmaps_png/cpp_24/ungroup.cpp @@ -0,0 +1,37 @@ + +/* Do not modify this file, it was automatically generated by the + * PNG2cpp CMake script, using a *.png file as input. + */ + +#include + +static const unsigned char png[] = { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x08, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x77, 0x3d, + 0xf8, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc3, 0x00, 0x00, 0x0e, + 0xc3, 0x01, 0xc7, 0x6f, 0xa8, 0x64, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6f, + 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x00, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x9b, 0xee, 0x3c, 0x1a, 0x00, 0x00, 0x00, 0x0b, 0x74, + 0x45, 0x58, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x00, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x57, 0xde, + 0x0d, 0x88, 0x00, 0x00, 0x00, 0x52, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, + 0x67, 0x68, 0x74, 0x00, 0x43, 0x43, 0x20, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x2d, 0x53, 0x68, 0x61, 0x72, 0x65, 0x41, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, + 0x73, 0x2f, 0x62, 0x79, 0x2d, 0x73, 0x61, 0x2f, 0x34, 0x2e, 0x30, 0x2f, 0xc3, 0x54, 0x62, 0x05, + 0x00, 0x00, 0x00, 0x8f, 0x49, 0x44, 0x41, 0x54, 0x48, 0x89, 0xc5, 0x94, 0x3b, 0x12, 0x80, 0x20, + 0x0c, 0x44, 0x83, 0x63, 0xe1, 0x01, 0x73, 0xcc, 0x3d, 0xa0, 0x56, 0xda, 0xe8, 0x4c, 0x0a, 0x88, + 0x2c, 0x10, 0x78, 0x15, 0x13, 0x86, 0x2c, 0xf9, 0x8a, 0x04, 0x93, 0x44, 0x44, 0x54, 0xf5, 0xb6, + 0x46, 0x00, 0xe9, 0x3b, 0x7b, 0x77, 0x35, 0xec, 0x39, 0xe3, 0xeb, 0xf4, 0x62, 0x1c, 0x51, 0x02, + 0x5e, 0x04, 0x2c, 0x5b, 0xcf, 0x63, 0x8a, 0xbf, 0x9f, 0xaa, 0xea, 0xd9, 0xe2, 0xd7, 0x46, 0x30, + 0x24, 0xe7, 0x9e, 0x40, 0x08, 0xe1, 0x6d, 0x1a, 0x1e, 0x41, 0x69, 0x0e, 0x9a, 0x0a, 0x5a, 0x2d, + 0x00, 0xe0, 0x30, 0x62, 0x5d, 0x73, 0x40, 0xe5, 0xb3, 0x24, 0xfa, 0xd5, 0x25, 0x67, 0xcf, 0x46, + 0xd0, 0x2b, 0x68, 0x19, 0x52, 0x64, 0x00, 0xa9, 0xd4, 0x5d, 0xf3, 0x56, 0x05, 0x8b, 0x97, 0x16, + 0x7b, 0x17, 0x1e, 0xc1, 0x9c, 0x55, 0xc1, 0xc2, 0xb4, 0xe9, 0x9a, 0x55, 0xc1, 0xb2, 0x74, 0x0e, + 0xc2, 0x79, 0x00, 0x79, 0x9c, 0x42, 0x08, 0x67, 0x1a, 0xe9, 0x97, 0x00, 0x00, 0x00, 0x00, 0x49, + 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; + +const BITMAP_OPAQUE ungroup_xpm[1] = {{ png, sizeof( png ), "ungroup_xpm" }}; + +//EOF diff --git a/bitmaps_png/include/bitmaps_png/bitmaps_list.h b/bitmaps_png/include/bitmaps_png/bitmaps_list.h index 4152b21eb4..310734223f 100644 --- a/bitmaps_png/include/bitmaps_png/bitmaps_list.h +++ b/bitmaps_png/include/bitmaps_png/bitmaps_list.h @@ -192,11 +192,9 @@ EXTERN_BITMAP( grid_select_axis_xpm ) EXTERN_BITMAP( grid_select_xpm ) EXTERN_BITMAP( grid_xpm ) EXTERN_BITMAP( group_xpm ) -EXTERN_BITMAP( group_add_xpm ) EXTERN_BITMAP( group_enter_xpm ) EXTERN_BITMAP( group_leave_xpm ) EXTERN_BITMAP( group_remove_xpm ) -EXTERN_BITMAP( group_ungroup_xpm ) EXTERN_BITMAP( help_xpm ) EXTERN_BITMAP( help_online_xpm ) EXTERN_BITMAP( hidden_pin_xpm ) @@ -501,6 +499,7 @@ EXTERN_BITMAP( triangle_right_xpm ) EXTERN_BITMAP( triangle_down_xpm ) EXTERN_BITMAP( undelete_xpm ) EXTERN_BITMAP( undo_xpm ) +EXTERN_BITMAP( ungroup_xpm ) EXTERN_BITMAP( unit_inch_xpm ) EXTERN_BITMAP( unit_mil_xpm ) EXTERN_BITMAP( unit_mm_xpm ) diff --git a/bitmaps_png/sources/group.svg b/bitmaps_png/sources/group.svg index 225260da79..330f788e52 100755 --- a/bitmaps_png/sources/group.svg +++ b/bitmaps_png/sources/group.svg @@ -12,7 +12,10 @@ viewBox="0 0 24 24" version="1.1" sodipodi:docname="group.svg" - inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"> + inkscape:version="1.0.2 (e86c8708, 2021-01-15)" + inkscape:export-filename="/Users/jeff/kicad_dev/kicad/bitmaps_png/group.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96"> @@ -175,4 +178,18 @@ style="fill:none;stroke:#545454;stroke-width:0.999997px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="m 21.499998,13 v 3" id="path14-0-3-7-7-4-0" /> + + diff --git a/bitmaps_png/sources/group_ungroup.svg b/bitmaps_png/sources/group_ungroup.svg deleted file mode 100755 index 87a714bc1f..0000000000 --- a/bitmaps_png/sources/group_ungroup.svg +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - image/svg+xml - - group - - - - - - - - - - - - - - - group - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bitmaps_png/sources/mirror_h.svg b/bitmaps_png/sources/mirror_h.svg index 6699b31d54..f88a98413f 100755 --- a/bitmaps_png/sources/mirror_h.svg +++ b/bitmaps_png/sources/mirror_h.svg @@ -12,7 +12,10 @@ viewBox="0 0 24 24" version="1.1" sodipodi:docname="mirror_h.svg" - inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"> + inkscape:version="1.0.2 (e86c8708, 2021-01-15)" + inkscape:export-filename="/Users/jeff/kicad_dev/kicad/bitmaps_png/png_24/mirror_h.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96"> + spacingy="0.5" /> @@ -80,18 +81,15 @@ mirror_h - - + + style="fill:#909090;stroke-width:1.07418;fill-opacity:1" + d="M 11,2 1.9999997,22 H 11 Z" + class="cls-3" + sodipodi:nodetypes="cccc" /> diff --git a/bitmaps_png/sources/mirror_v.svg b/bitmaps_png/sources/mirror_v.svg index da6ff2e515..158276634c 100755 --- a/bitmaps_png/sources/mirror_v.svg +++ b/bitmaps_png/sources/mirror_v.svg @@ -12,7 +12,10 @@ viewBox="0 0 24 24" version="1.1" sodipodi:docname="mirror_v.svg" - inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"> + inkscape:version="1.0.2 (e86c8708, 2021-01-15)" + inkscape:export-filename="/Users/jeff/kicad_dev/kicad/bitmaps_png/png_24/mirror_v.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96"> + spacingy="0.5" /> @@ -80,18 +81,15 @@ mirror_h - - + + style="fill:#909090;stroke-width:1.07418;fill-opacity:1" + d="M 22,11 2,1.9999998 V 11 Z" + class="cls-3" + sodipodi:nodetypes="cccc" /> diff --git a/bitmaps_png/sources/group_add.svg b/bitmaps_png/sources/ungroup.svg similarity index 65% rename from bitmaps_png/sources/group_add.svg rename to bitmaps_png/sources/ungroup.svg index 900ce83ba4..094ecacccb 100644 --- a/bitmaps_png/sources/group_add.svg +++ b/bitmaps_png/sources/ungroup.svg @@ -11,8 +11,11 @@ data-name="Слой 1" viewBox="0 0 24 24" version="1.1" - sodipodi:docname="group_add.svg" - inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"> + sodipodi:docname="ungroup.svg" + inkscape:version="1.0.2 (e86c8708, 2021-01-15)" + inkscape:export-filename="/Users/jeff/kicad_dev/kicad/bitmaps_png/sources/ungroup.png" + inkscape:export-xdpi="60" + inkscape:export-ydpi="60"> @@ -79,14 +82,6 @@ group - - - - - - - - - - - - + + + + + + + diff --git a/eeschema/sch_bitmap.cpp b/eeschema/sch_bitmap.cpp index b9e0bf9005..53c50ae13e 100644 --- a/eeschema/sch_bitmap.cpp +++ b/eeschema/sch_bitmap.cpp @@ -128,16 +128,16 @@ wxSize SCH_BITMAP::GetSize() const } -void SCH_BITMAP::MirrorX( int aXaxis_position ) +void SCH_BITMAP::MirrorVertically( int aCenter ) { - MIRROR( m_pos.y, aXaxis_position ); + MIRROR( m_pos.y, aCenter ); m_image->Mirror( true ); } -void SCH_BITMAP::MirrorY( int aYaxis_position ) +void SCH_BITMAP::MirrorHorizontally( int aCenter ) { - MIRROR( m_pos.x, aYaxis_position ); + MIRROR( m_pos.x, aCenter ); m_image->Mirror( false ); } diff --git a/eeschema/sch_bitmap.h b/eeschema/sch_bitmap.h index 31e41cf352..88ca44d86a 100644 --- a/eeschema/sch_bitmap.h +++ b/eeschema/sch_bitmap.h @@ -124,8 +124,8 @@ public: */ bool IsMovableFromAnchorPoint() const override { return false; } - void MirrorY( int aYaxis_position ) override; - void MirrorX( int aXaxis_position ) override; + void MirrorHorizontally( int aCenter ) override; + void MirrorVertically( int aCenter ) override; void Rotate( wxPoint aPosition ) override; wxString GetSelectMenuText( EDA_UNITS aUnits ) const override diff --git a/eeschema/sch_bus_entry.cpp b/eeschema/sch_bus_entry.cpp index 91f0f03e03..91708e269e 100644 --- a/eeschema/sch_bus_entry.cpp +++ b/eeschema/sch_bus_entry.cpp @@ -254,16 +254,16 @@ void SCH_BUS_ENTRY_BASE::Print( const RENDER_SETTINGS* aSettings, const wxPoint& } -void SCH_BUS_ENTRY_BASE::MirrorX( int aXaxis_position ) +void SCH_BUS_ENTRY_BASE::MirrorVertically( int aCenter ) { - MIRROR( m_pos.y, aXaxis_position ); + MIRROR( m_pos.y, aCenter ); m_size.y = -m_size.y; } -void SCH_BUS_ENTRY_BASE::MirrorY( int aYaxis_position ) +void SCH_BUS_ENTRY_BASE::MirrorHorizontally( int aCenter ) { - MIRROR( m_pos.x, aYaxis_position ); + MIRROR( m_pos.x, aCenter ); m_size.x = -m_size.x; } diff --git a/eeschema/sch_bus_entry.h b/eeschema/sch_bus_entry.h index 2644ed706c..cf8dd4f146 100644 --- a/eeschema/sch_bus_entry.h +++ b/eeschema/sch_bus_entry.h @@ -88,8 +88,8 @@ public: m_pos += aMoveVector; } - void MirrorY( int aYaxis_position ) override; - void MirrorX( int aXaxis_position ) override; + void MirrorHorizontally( int aCenter ) override; + void MirrorVertically( int aCenter ) override; void Rotate( wxPoint aPosition ) override; bool IsDangling() const override; diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index df94df1dc6..e9cfdcb06a 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -1439,12 +1439,12 @@ BITMAP_DEF SCH_COMPONENT::GetMenuImage() const } -void SCH_COMPONENT::MirrorY( int aYaxis_position ) +void SCH_COMPONENT::MirrorHorizontally( int aCenter ) { int dx = m_pos.x; SetOrientation( CMP_MIRROR_Y ); - MIRROR( m_pos.x, aYaxis_position ); + MIRROR( m_pos.x, aCenter ); dx -= m_pos.x; // dx,0 is the move vector for this transform for( SCH_FIELD& field : m_fields ) @@ -1457,12 +1457,12 @@ void SCH_COMPONENT::MirrorY( int aYaxis_position ) } -void SCH_COMPONENT::MirrorX( int aXaxis_position ) +void SCH_COMPONENT::MirrorVertically( int aCenter ) { int dy = m_pos.y; SetOrientation( CMP_MIRROR_X ); - MIRROR( m_pos.y, aXaxis_position ); + MIRROR( m_pos.y, aCenter ); dy -= m_pos.y; // dy,0 is the move vector for this transform for( SCH_FIELD& field : m_fields ) diff --git a/eeschema/sch_component.h b/eeschema/sch_component.h index b2409a4719..1ec3930bb6 100644 --- a/eeschema/sch_component.h +++ b/eeschema/sch_component.h @@ -295,7 +295,7 @@ public: * * Because there are different ways to have a given orientation/mirror, * the orientation/mirror is not necessary what the user does. For example: - * a mirrorX then a mirrorY returns no mirror but a rotate. This function finds + * a mirrorV then a mirrorH returns no mirror but a rotate. This function finds * a rotation and a mirror value #CMP_MIRROR_X because this is the first mirror * option tested. This can differs from the orientation made by an user. A * #CMP_MIRROR_Y is returned as a #CMP_MIRROR_X with an orientation 180 because @@ -595,8 +595,8 @@ public: SetModified(); } - void MirrorY( int aYaxis_position ) override; - void MirrorX( int aXaxis_position ) override; + void MirrorHorizontally( int aCenter ) override; + void MirrorVertically( int aCenter ) override; void Rotate( wxPoint aPosition ) override; bool Matches( const wxFindReplaceData& aSearchData, void* aAuxData ) const override; diff --git a/eeschema/sch_field.h b/eeschema/sch_field.h index 76c57b9bd4..7b6701e899 100644 --- a/eeschema/sch_field.h +++ b/eeschema/sch_field.h @@ -160,24 +160,24 @@ public: void Rotate( wxPoint aPosition ) override; /** - * @copydoc SCH_ITEM::MirrorX() + * @copydoc SCH_ITEM::MirrorVertically() * * This overload does nothing. Fields are never mirrored alone. They are moved * when the parent component is mirrored. This function is only needed by the * pure function of the master class. */ - void MirrorX( int aXaxis_position ) override + void MirrorVertically( int aCenter ) override { } /** - * @copydoc SCH_ITEM::MirrorY() + * @copydoc SCH_ITEM::MirrorHorizontally() * * This overload does nothing. Fields are never mirrored alone. They are moved * when the parent component is mirrored. This function is only needed by the * pure function of the master class. */ - void MirrorY( int aYaxis_position ) override + void MirrorHorizontally( int aCenter ) override { } diff --git a/eeschema/sch_item.h b/eeschema/sch_item.h index a65818b4ed..2997d5331a 100644 --- a/eeschema/sch_item.h +++ b/eeschema/sch_item.h @@ -312,30 +312,21 @@ public: /** * Move the item by \a aMoveVector to a new position. - * - * @param aMoveVector = the displacement vector */ virtual void Move( const wxPoint& aMoveVector ) = 0; /** - * Mirror item relative to the Y axis about \a aYaxis_position. - * - * @param aYaxis_position The Y axis position to mirror around. + * Mirror item horizontally about \a aCenter. */ - virtual void MirrorY( int aYaxis_position ) = 0; + virtual void MirrorHorizontally( int aCenter ) = 0; /** - * Mirror item relative to the X axis about \a aXaxis_position. - * - * @param aXaxis_position The X axis position to mirror around. + * Mirror item vertically about \a aCenter. */ - virtual void MirrorX( int aXaxis_position ) = 0; + virtual void MirrorVertically( int aCenter ) = 0; /** * Rotate the item around \a aPosition 90 degrees in the clockwise direction. - * - * @param aPosition A reference to a wxPoint object containing the coordinates to - * rotate around. */ virtual void Rotate( wxPoint aPosition ) = 0; diff --git a/eeschema/sch_junction.cpp b/eeschema/sch_junction.cpp index 6415c3fb31..69fa10a134 100644 --- a/eeschema/sch_junction.cpp +++ b/eeschema/sch_junction.cpp @@ -123,15 +123,15 @@ void SCH_JUNCTION::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffs } -void SCH_JUNCTION::MirrorX( int aXaxis_position ) +void SCH_JUNCTION::MirrorVertically( int aCenter ) { - MIRROR( m_pos.y, aXaxis_position ); + MIRROR( m_pos.y, aCenter ); } -void SCH_JUNCTION::MirrorY( int aYaxis_position ) +void SCH_JUNCTION::MirrorHorizontally( int aCenter ) { - MIRROR( m_pos.x, aYaxis_position ); + MIRROR( m_pos.x, aCenter ); } diff --git a/eeschema/sch_junction.h b/eeschema/sch_junction.h index 65d3fd3d60..22f8cc95db 100644 --- a/eeschema/sch_junction.h +++ b/eeschema/sch_junction.h @@ -69,8 +69,8 @@ public: m_pos += aMoveVector; } - void MirrorY( int aYaxis_position ) override; - void MirrorX( int aXaxis_position ) override; + void MirrorHorizontally( int aCenter ) override; + void MirrorVertically( int aCenter ) override; void Rotate( wxPoint aPosition ) override; void GetEndPoints( std::vector & aItemList ) override; diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp index 7b3b655500..c990d274c1 100644 --- a/eeschema/sch_line.cpp +++ b/eeschema/sch_line.cpp @@ -377,17 +377,17 @@ void SCH_LINE::Print( const RENDER_SETTINGS* aSettings, const wxPoint& offset ) } -void SCH_LINE::MirrorX( int aXaxis_position ) +void SCH_LINE::MirrorVertically( int aCenter ) { - MIRROR( m_start.y, aXaxis_position ); - MIRROR( m_end.y, aXaxis_position ); + MIRROR( m_start.y, aCenter ); + MIRROR( m_end.y, aCenter ); } -void SCH_LINE::MirrorY( int aYaxis_position ) +void SCH_LINE::MirrorHorizontally( int aCenter ) { - MIRROR( m_start.x, aYaxis_position ); - MIRROR( m_end.x, aYaxis_position ); + MIRROR( m_start.x, aCenter ); + MIRROR( m_end.x, aCenter ); } diff --git a/eeschema/sch_line.h b/eeschema/sch_line.h index 14a267ec11..05acf5f6da 100644 --- a/eeschema/sch_line.h +++ b/eeschema/sch_line.h @@ -172,8 +172,8 @@ public: void MoveStart( const wxPoint& aMoveVector ); void MoveEnd( const wxPoint& aMoveVector ); - void MirrorX( int aXaxis_position ) override; - void MirrorY( int aYaxis_position ) override; + void MirrorVertically( int aCenter ) override; + void MirrorHorizontally( int aCenter ) override; void Rotate( wxPoint aPosition ) override; void RotateStart( wxPoint aPosition ); void RotateEnd( wxPoint aPosition ); diff --git a/eeschema/sch_marker.cpp b/eeschema/sch_marker.cpp index 71975d3f3e..ac54b99548 100644 --- a/eeschema/sch_marker.cpp +++ b/eeschema/sch_marker.cpp @@ -179,13 +179,13 @@ void SCH_MARKER::Rotate( wxPoint aPosition ) } -void SCH_MARKER::MirrorX( int aXaxis_position ) +void SCH_MARKER::MirrorVertically( int aCenter ) { // Marker geometry isn't user-editable } -void SCH_MARKER::MirrorY( int aYaxis_position ) +void SCH_MARKER::MirrorHorizontally( int aCenter ) { // Marker geometry isn't user-editable } diff --git a/eeschema/sch_marker.h b/eeschema/sch_marker.h index 5c373daa26..a5ca2b0a15 100644 --- a/eeschema/sch_marker.h +++ b/eeschema/sch_marker.h @@ -77,8 +77,8 @@ public: m_Pos += aMoveVector; } - void MirrorY( int aYaxis_position ) override; - void MirrorX( int aXaxis_position ) override; + void MirrorHorizontally( int aCenter ) override; + void MirrorVertically( int aCenter ) override; void Rotate( wxPoint aPosition ) override; /** diff --git a/eeschema/sch_no_connect.cpp b/eeschema/sch_no_connect.cpp index 5ae9036e99..c25b6973ce 100644 --- a/eeschema/sch_no_connect.cpp +++ b/eeschema/sch_no_connect.cpp @@ -115,15 +115,15 @@ void SCH_NO_CONNECT::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOf } -void SCH_NO_CONNECT::MirrorX( int aXaxis_position ) +void SCH_NO_CONNECT::MirrorVertically( int aCenter ) { - MIRROR( m_pos.y, aXaxis_position ); + MIRROR( m_pos.y, aCenter ); } -void SCH_NO_CONNECT::MirrorY( int aYaxis_position ) +void SCH_NO_CONNECT::MirrorHorizontally( int aCenter ) { - MIRROR( m_pos.x, aYaxis_position ); + MIRROR( m_pos.x, aCenter ); } diff --git a/eeschema/sch_no_connect.h b/eeschema/sch_no_connect.h index fc0556a67e..55ecbf88bb 100644 --- a/eeschema/sch_no_connect.h +++ b/eeschema/sch_no_connect.h @@ -82,8 +82,8 @@ public: m_pos += aMoveVector; } - void MirrorY( int aYaxis_position ) override; - void MirrorX( int aXaxis_position ) override; + void MirrorHorizontally( int aCenter ) override; + void MirrorVertically( int aCenter ) override; void Rotate( wxPoint aPosition ) override; bool IsConnectable() const override { return true; } diff --git a/eeschema/sch_pin.h b/eeschema/sch_pin.h index 117ca8850c..a4e30813b8 100644 --- a/eeschema/sch_pin.h +++ b/eeschema/sch_pin.h @@ -81,8 +81,8 @@ public: void Move( const wxPoint& aMoveVector ) override {} - void MirrorY( int aYaxis_position ) override {} - void MirrorX( int aXaxis_position ) override {} + void MirrorHorizontally( int aCenter ) override {} + void MirrorVertically( int aCenter ) override {} void Rotate( wxPoint aPosition ) override {} diff --git a/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp b/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp index 00842c15a5..c13c881929 100644 --- a/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp +++ b/eeschema/sch_plugins/eagle/sch_eagle_plugin.cpp @@ -1201,7 +1201,7 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode ) component->SetOrientation( kiCadComponentRotation( einstance.rot->degrees ) ); if( einstance.rot->mirror ) - component->MirrorY( einstance.x.ToSchUnits() ); + component->MirrorHorizontally( einstance.x.ToSchUnits() ); } std::vector partFields; diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index a5e5150697..3083c7125a 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -761,23 +761,23 @@ void SCH_SHEET::Rotate( wxPoint aPosition ) } -void SCH_SHEET::MirrorX( int aXaxis_position ) +void SCH_SHEET::MirrorVertically( int aCenter ) { - MIRROR( m_pos.y, aXaxis_position ); + MIRROR( m_pos.y, aCenter ); m_pos.y -= m_size.y; for( SCH_SHEET_PIN* sheetPin : m_pins ) - sheetPin->MirrorX( aXaxis_position ); + sheetPin->MirrorVertically( aCenter ); } -void SCH_SHEET::MirrorY( int aYaxis_position ) +void SCH_SHEET::MirrorHorizontally( int aCenter ) { - MIRROR( m_pos.x, aYaxis_position ); + MIRROR( m_pos.x, aCenter ); m_pos.x -= m_size.x; for( SCH_SHEET_PIN* sheetPin : m_pins ) - sheetPin->MirrorY( aYaxis_position ); + sheetPin->MirrorHorizontally( aCenter ); } diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h index d1705947b3..f51b165a99 100644 --- a/eeschema/sch_sheet.h +++ b/eeschema/sch_sheet.h @@ -179,8 +179,8 @@ public: Offset( aMoveVector ); } - void MirrorX( int aXaxis_position ) override; - void MirrorY( int aYaxis_position ) override; + void MirrorVertically( int aCenter ) override; + void MirrorHorizontally( int aCenter ) override; void Rotate( wxPoint aPosition ) override; bool Matches( const wxFindReplaceData& aSearchData, void* aAuxData ) const override @@ -522,8 +522,8 @@ public: field.Move( aMoveVector ); } - void MirrorY( int aYaxis_position ) override; - void MirrorX( int aXaxis_position ) override; + void MirrorHorizontally( int aYaxis_position ) override; + void MirrorVertically( int aXaxis_position ) override; void Rotate( wxPoint aPosition ) override; bool Matches( const wxFindReplaceData& aSearchData, void* aAuxData ) const override; diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp index 1a3e748848..9fbc1bf143 100644 --- a/eeschema/sch_sheet_path.cpp +++ b/eeschema/sch_sheet_path.cpp @@ -75,8 +75,8 @@ public: void SetPosition( const wxPoint& ) override {} void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override {} void Move( const wxPoint& aMoveVector ) override {} - void MirrorY( int aYaxis_position ) override {} - void MirrorX( int aXaxis_position ) override {} + void MirrorHorizontally( int aCenter ) override {} + void MirrorVertically( int aCenter ) override {} void Rotate( wxPoint aPosition ) override {} #if defined(DEBUG) diff --git a/eeschema/sch_sheet_pin.cpp b/eeschema/sch_sheet_pin.cpp index 89ef2ceb06..acc0818ffd 100644 --- a/eeschema/sch_sheet_pin.cpp +++ b/eeschema/sch_sheet_pin.cpp @@ -213,11 +213,11 @@ void SCH_SHEET_PIN::ConstrainOnEdge( wxPoint Pos ) } -void SCH_SHEET_PIN::MirrorX( int aXaxis_position ) +void SCH_SHEET_PIN::MirrorVertically( int aCenter ) { - int p = GetTextPos().y - aXaxis_position; + int p = GetTextPos().y - aCenter; - SetTextY( aXaxis_position - p ); + SetTextY( aCenter - p ); switch( m_edge ) { @@ -228,11 +228,11 @@ void SCH_SHEET_PIN::MirrorX( int aXaxis_position ) } -void SCH_SHEET_PIN::MirrorY( int aYaxis_position ) +void SCH_SHEET_PIN::MirrorHorizontally( int aCenter ) { - int p = GetTextPos().x - aYaxis_position; + int p = GetTextPos().x - aCenter; - SetTextX( aYaxis_position - p ); + SetTextX( aCenter - p ); switch( m_edge ) { diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index b44b6405a7..586a08e2eb 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -197,21 +197,21 @@ wxPoint SCH_TEXT::GetSchematicTextOffset( const RENDER_SETTINGS* aSettings ) con } -void SCH_TEXT::MirrorY( int aYaxis_position ) +void SCH_TEXT::MirrorHorizontally( int aCenter ) { // Text is NOT really mirrored; it is moved to a suitable horizontal position SetLabelSpinStyle( GetLabelSpinStyle().MirrorY() ); - SetTextX( MIRRORVAL( GetTextPos().x, aYaxis_position ) ); + SetTextX( MIRRORVAL( GetTextPos().x, aCenter ) ); } -void SCH_TEXT::MirrorX( int aXaxis_position ) +void SCH_TEXT::MirrorVertically( int aCenter ) { // Text is NOT really mirrored; it is moved to a suitable vertical position SetLabelSpinStyle( GetLabelSpinStyle().MirrorX() ); - SetTextY( MIRRORVAL( GetTextPos().y, aXaxis_position ) ); + SetTextY( MIRRORVAL( GetTextPos().y, aCenter ) ); } @@ -1057,10 +1057,10 @@ void SCH_GLOBALLABEL::MirrorSpinStyle( bool aLeftRight ) } -void SCH_GLOBALLABEL::MirrorY( int aYaxis_position ) +void SCH_GLOBALLABEL::MirrorHorizontally( int aCenter ) { wxPoint old_pos = GetPosition(); - SCH_TEXT::MirrorY( aYaxis_position ); + SCH_TEXT::MirrorHorizontally( aCenter ); if( m_intersheetRefsField.GetHorizJustify() == GR_TEXT_HJUSTIFY_LEFT ) m_intersheetRefsField.SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT ); @@ -1075,10 +1075,10 @@ void SCH_GLOBALLABEL::MirrorY( int aYaxis_position ) } -void SCH_GLOBALLABEL::MirrorX( int aXaxis_position ) +void SCH_GLOBALLABEL::MirrorVertically( int aCenter ) { wxPoint old_pos = GetPosition(); - SCH_TEXT::MirrorX( aXaxis_position ); + SCH_TEXT::MirrorVertically( aCenter ); wxPoint pos = m_intersheetRefsField.GetTextPos(); wxPoint delta = old_pos - pos; pos.y = GetPosition().y + delta.y; diff --git a/eeschema/sch_text.h b/eeschema/sch_text.h index 98461032cf..e894e0d740 100644 --- a/eeschema/sch_text.h +++ b/eeschema/sch_text.h @@ -116,7 +116,7 @@ public: case LABEL_SPIN_STYLE::BOTTOM: newSpin = LABEL_SPIN_STYLE::UP; break; case LABEL_SPIN_STYLE::LEFT: break; case LABEL_SPIN_STYLE::RIGHT: break; - default: wxLogWarning( "MirrorX encountered unknown current spin style" ); break; + default: wxLogWarning( "MirrorVertically encountered unknown current spin style" ); break; } return LABEL_SPIN_STYLE( newSpin ); @@ -135,7 +135,7 @@ public: case LABEL_SPIN_STYLE::RIGHT: newSpin = LABEL_SPIN_STYLE::LEFT; break; case LABEL_SPIN_STYLE::UP: break; case LABEL_SPIN_STYLE::BOTTOM: break; - default: wxLogWarning( "MirrorY encountered unknown current spin style" ); break; + default: wxLogWarning( "MirrorHorizontally encountered unknown current spin style" ); break; } return LABEL_SPIN_STYLE( newSpin ); @@ -276,8 +276,8 @@ public: EDA_TEXT::Offset( aMoveVector ); } - void MirrorY( int aYaxis_position ) override; - void MirrorX( int aXaxis_position ) override; + void MirrorHorizontally( int aCenter ) override; + void MirrorVertically( int aCenter ) override; void Rotate( wxPoint aPosition ) override; virtual void Rotate90( bool aClockwise ); @@ -406,8 +406,8 @@ public: void Rotate90( bool aClockwise ) override; void MirrorSpinStyle( bool aLeftRight ) override; - void MirrorY( int aYaxis_position ) override; - void MirrorX( int aXaxis_position ) override; + void MirrorHorizontally( int aCenter ) override; + void MirrorVertically( int aCenter ) override; void SetLabelSpinStyle( LABEL_SPIN_STYLE aSpinStyle ) override; diff --git a/eeschema/symbol_editor/toolbars_symbol_editor.cpp b/eeschema/symbol_editor/toolbars_symbol_editor.cpp index e25ea9e151..2b43512e22 100644 --- a/eeschema/symbol_editor/toolbars_symbol_editor.cpp +++ b/eeschema/symbol_editor/toolbars_symbol_editor.cpp @@ -103,6 +103,12 @@ void SYMBOL_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->Add( ACTIONS::zoomFitScreen ); m_mainToolBar->Add( ACTIONS::zoomTool, ACTION_TOOLBAR::TOGGLE, ACTION_TOOLBAR::CANCEL ); + m_mainToolBar->AddScaledSeparator( this ); + m_mainToolBar->Add( EE_ACTIONS::rotateCCW ); + m_mainToolBar->Add( EE_ACTIONS::rotateCW ); + m_mainToolBar->Add( EE_ACTIONS::mirrorV ); + m_mainToolBar->Add( EE_ACTIONS::mirrorH ); + m_mainToolBar->AddScaledSeparator( this ); m_mainToolBar->Add( EE_ACTIONS::symbolProperties ); m_mainToolBar->Add( EE_ACTIONS::pinTable ); diff --git a/eeschema/toolbars_sch_editor.cpp b/eeschema/toolbars_sch_editor.cpp index 305bb1f6b8..504857fd9e 100644 --- a/eeschema/toolbars_sch_editor.cpp +++ b/eeschema/toolbars_sch_editor.cpp @@ -90,6 +90,12 @@ void SCH_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->Add( EE_ACTIONS::navigateHierarchy ); m_mainToolBar->Add( EE_ACTIONS::leaveSheet ); + m_mainToolBar->AddScaledSeparator( this ); + m_mainToolBar->Add( EE_ACTIONS::rotateCCW ); + m_mainToolBar->Add( EE_ACTIONS::rotateCW ); + m_mainToolBar->Add( EE_ACTIONS::mirrorV ); + m_mainToolBar->Add( EE_ACTIONS::mirrorH ); + m_mainToolBar->AddScaledSeparator( this ); m_mainToolBar->Add( ACTIONS::showSymbolEditor ); m_mainToolBar->Add( ACTIONS::showSymbolBrowser ); diff --git a/eeschema/tools/ee_actions.cpp b/eeschema/tools/ee_actions.cpp index 60b6e4b662..d131817eec 100644 --- a/eeschema/tools/ee_actions.cpp +++ b/eeschema/tools/ee_actions.cpp @@ -370,16 +370,16 @@ TOOL_ACTION EE_ACTIONS::rotateCCW( "eeschema.InteractiveEdit.rotateCCW", _( "Rotate" ), _( "Rotates selected item(s) counter-clockwise" ), rotate_ccw_xpm ); -TOOL_ACTION EE_ACTIONS::mirrorX( "eeschema.InteractiveEdit.mirrorX", +TOOL_ACTION EE_ACTIONS::mirrorV( "eeschema.InteractiveEdit.mirrorV", AS_GLOBAL, - 'X', LEGACY_HK_NAME( "Mirror X" ), - _( "Mirror Around Horizontal Axis" ), _( "Flips selected item(s) from top to bottom" ), + 'Y', LEGACY_HK_NAME( "Mirror X" ), // Yes, these were backwards prior to 6.0.... + _( "Mirror Vertically" ), _( "Flips selected item(s) from top to bottom" ), mirror_v_xpm ); -TOOL_ACTION EE_ACTIONS::mirrorY( "eeschema.InteractiveEdit.mirrorY", +TOOL_ACTION EE_ACTIONS::mirrorH( "eeschema.InteractiveEdit.mirrorH", AS_GLOBAL, - 'Y', LEGACY_HK_NAME( "Mirror Y" ), - _( "Mirror Around Vertical Axis" ), _( "Flips selected item(s) from left to right" ), + 'X', LEGACY_HK_NAME( "Mirror Y" ), // Yes, these were backwards prior to 6.0.... + _( "Mirror Horizontally" ), _( "Flips selected item(s) from left to right" ), mirror_h_xpm ); TOOL_ACTION EE_ACTIONS::properties( "eeschema.InteractiveEdit.properties", diff --git a/eeschema/tools/ee_actions.h b/eeschema/tools/ee_actions.h index af27e63aa3..5010d0c5b3 100644 --- a/eeschema/tools/ee_actions.h +++ b/eeschema/tools/ee_actions.h @@ -114,8 +114,8 @@ public: static TOOL_ACTION repeatDrawItem; static TOOL_ACTION rotateCW; static TOOL_ACTION rotateCCW; - static TOOL_ACTION mirrorX; - static TOOL_ACTION mirrorY; + static TOOL_ACTION mirrorV; + static TOOL_ACTION mirrorH; static TOOL_ACTION properties; static TOOL_ACTION editReference; static TOOL_ACTION editValue; diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index d9f725d1bb..e91f23e6a0 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -645,8 +645,8 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) if( ( type == SCH_BUS_WIRE_ENTRY_T ) && ( evt->IsAction( &EE_ACTIONS::rotateCW ) || evt->IsAction( &EE_ACTIONS::rotateCCW ) - || evt->IsAction( &EE_ACTIONS::mirrorX ) - || evt->IsAction( &EE_ACTIONS::mirrorY ) ) ) + || evt->IsAction( &EE_ACTIONS::mirrorV ) + || evt->IsAction( &EE_ACTIONS::mirrorH ) ) ) { SCH_BUS_ENTRY_BASE* busItem = static_cast( previewItem ); @@ -656,13 +656,13 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) { busItem->Rotate( busItem->GetPosition() ); } - else if( evt->IsAction( &EE_ACTIONS::mirrorX ) ) + else if( evt->IsAction( &EE_ACTIONS::mirrorV ) ) { - busItem->MirrorX( busItem->GetPosition().x ); + busItem->MirrorVertically( busItem->GetPosition().x ); } - else if( evt->IsAction( &EE_ACTIONS::mirrorY ) ) + else if( evt->IsAction( &EE_ACTIONS::mirrorH ) ) { - busItem->MirrorY( busItem->GetPosition().y ); + busItem->MirrorHorizontally( busItem->GetPosition().y ); } m_view->ClearPreview(); diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index 6e79c564e0..43ed808f82 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -271,8 +271,8 @@ bool SCH_EDIT_TOOL::Init() moveMenu.AddSeparator(); moveMenu.AddItem( EE_ACTIONS::rotateCCW, orientCondition ); moveMenu.AddItem( EE_ACTIONS::rotateCW, orientCondition ); - moveMenu.AddItem( EE_ACTIONS::mirrorX, orientCondition ); - moveMenu.AddItem( EE_ACTIONS::mirrorY, orientCondition ); + moveMenu.AddItem( EE_ACTIONS::mirrorV, orientCondition ); + moveMenu.AddItem( EE_ACTIONS::mirrorH, orientCondition ); moveMenu.AddItem( EE_ACTIONS::properties, propertiesCondition ); moveMenu.AddItem( EE_ACTIONS::editReference, singleSymbolCondition ); @@ -302,8 +302,8 @@ bool SCH_EDIT_TOOL::Init() drawMenu.AddItem( EE_ACTIONS::rotateCCW, orientCondition, 200 ); drawMenu.AddItem( EE_ACTIONS::rotateCW, orientCondition, 200 ); - drawMenu.AddItem( EE_ACTIONS::mirrorX, orientCondition, 200 ); - drawMenu.AddItem( EE_ACTIONS::mirrorY, orientCondition, 200 ); + drawMenu.AddItem( EE_ACTIONS::mirrorV, orientCondition, 200 ); + drawMenu.AddItem( EE_ACTIONS::mirrorH, orientCondition, 200 ); drawMenu.AddItem( EE_ACTIONS::properties, propertiesCondition, 200 ); drawMenu.AddItem( EE_ACTIONS::editReference, singleSymbolCondition, 200 ); @@ -332,8 +332,8 @@ bool SCH_EDIT_TOOL::Init() selToolMenu.AddItem( EE_ACTIONS::rotateCCW, orientCondition, 200 ); selToolMenu.AddItem( EE_ACTIONS::rotateCW, orientCondition, 200 ); - selToolMenu.AddItem( EE_ACTIONS::mirrorX, orientCondition, 200 ); - selToolMenu.AddItem( EE_ACTIONS::mirrorY, orientCondition, 200 ); + selToolMenu.AddItem( EE_ACTIONS::mirrorV, orientCondition, 200 ); + selToolMenu.AddItem( EE_ACTIONS::mirrorH, orientCondition, 200 ); selToolMenu.AddItem( EE_ACTIONS::properties, propertiesCondition, 200 ); selToolMenu.AddItem( EE_ACTIONS::editReference, E_C::SingleSymbol, 200 ); @@ -612,7 +612,7 @@ int SCH_EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent ) return 0; wxPoint mirrorPoint; - bool xAxis = ( aEvent.Matches( EE_ACTIONS::mirrorX.MakeEvent() ) ); + bool vertical = ( aEvent.Matches( EE_ACTIONS::mirrorV.MakeEvent() ) ); SCH_ITEM* item = static_cast( selection.Front() ); bool connections = false; bool moving = item->IsMoving(); @@ -628,7 +628,7 @@ int SCH_EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent ) { SCH_COMPONENT* component = static_cast( item ); - if( xAxis ) + if( vertical ) component->SetOrientation( CMP_MIRROR_X ); else component->SetOrientation( CMP_MIRROR_Y ); @@ -645,7 +645,7 @@ int SCH_EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent ) case SCH_HIER_LABEL_T: { SCH_TEXT* textItem = static_cast( item ); - textItem->MirrorSpinStyle( !xAxis ); + textItem->MirrorSpinStyle( !vertical ); break; } @@ -655,27 +655,27 @@ int SCH_EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent ) SCH_SHEET_PIN* pin = static_cast( item ); SCH_SHEET* sheet = pin->GetParent(); - if( xAxis ) - pin->MirrorX( sheet->GetBoundingBox().GetCenter().y ); + if( vertical ) + pin->MirrorVertically( sheet->GetBoundingBox().GetCenter().y ); else - pin->MirrorY( sheet->GetBoundingBox().GetCenter().x ); + pin->MirrorHorizontally( sheet->GetBoundingBox().GetCenter().x ); break; } case SCH_BUS_BUS_ENTRY_T: case SCH_BUS_WIRE_ENTRY_T: - if( xAxis ) - item->MirrorX( item->GetPosition().y ); + if( vertical ) + item->MirrorVertically( item->GetPosition().y ); else - item->MirrorY( item->GetPosition().x ); + item->MirrorHorizontally( item->GetPosition().x ); break; case SCH_FIELD_T: { SCH_FIELD* field = static_cast( item ); - if( xAxis ) + if( vertical ) field->SetVertJustify( (EDA_TEXT_VJUSTIFY_T)-field->GetVertJustify() ); else field->SetHorizJustify( (EDA_TEXT_HJUSTIFY_T)-field->GetHorizJustify() ); @@ -687,10 +687,10 @@ int SCH_EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent ) } case SCH_BITMAP_T: - if( xAxis ) - item->MirrorX( item->GetPosition().y ); + if( vertical ) + item->MirrorVertically( item->GetPosition().y ); else - item->MirrorY( item->GetPosition().x ); + item->MirrorHorizontally( item->GetPosition().x ); // The bitmap is cached in Opengl: clear the cache to redraw getView()->RecacheAllItems(); @@ -700,10 +700,10 @@ int SCH_EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent ) // Mirror the sheet on itself. Sheets do not have a anchor point. mirrorPoint = m_frame->GetNearestHalfGridPosition( item->GetBoundingBox().Centre() ); - if( xAxis ) - item->MirrorX( mirrorPoint.y ); + if( vertical ) + item->MirrorVertically( mirrorPoint.y ); else - item->MirrorY( mirrorPoint.x ); + item->MirrorHorizontally( mirrorPoint.x ); break; @@ -737,18 +737,18 @@ int SCH_EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent ) SCH_SHEET_PIN* pin = static_cast( item ); SCH_SHEET* sheet = pin->GetParent(); - if( xAxis ) - pin->MirrorX( sheet->GetBoundingBox().GetCenter().y ); + if( vertical ) + pin->MirrorVertically( sheet->GetBoundingBox().GetCenter().y ); else - pin->MirrorY( sheet->GetBoundingBox().GetCenter().x ); + pin->MirrorHorizontally( sheet->GetBoundingBox().GetCenter().x ); } } else { - if( xAxis ) - item->MirrorX( mirrorPoint.y ); + if( vertical ) + item->MirrorVertically( mirrorPoint.y ); else - item->MirrorY( mirrorPoint.x ); + item->MirrorHorizontally( mirrorPoint.x ); } connections |= item->IsConnectable(); @@ -1827,8 +1827,8 @@ void SCH_EDIT_TOOL::setTransitions() Go( &SCH_EDIT_TOOL::RepeatDrawItem, EE_ACTIONS::repeatDrawItem.MakeEvent() ); Go( &SCH_EDIT_TOOL::Rotate, EE_ACTIONS::rotateCW.MakeEvent() ); Go( &SCH_EDIT_TOOL::Rotate, EE_ACTIONS::rotateCCW.MakeEvent() ); - Go( &SCH_EDIT_TOOL::Mirror, EE_ACTIONS::mirrorX.MakeEvent() ); - Go( &SCH_EDIT_TOOL::Mirror, EE_ACTIONS::mirrorY.MakeEvent() ); + Go( &SCH_EDIT_TOOL::Mirror, EE_ACTIONS::mirrorV.MakeEvent() ); + Go( &SCH_EDIT_TOOL::Mirror, EE_ACTIONS::mirrorH.MakeEvent() ); Go( &SCH_EDIT_TOOL::DoDelete, ACTIONS::doDelete.MakeEvent() ); Go( &SCH_EDIT_TOOL::DeleteItemCursor, ACTIONS::deleteTool.MakeEvent() ); diff --git a/eeschema/tools/symbol_editor_edit_tool.cpp b/eeschema/tools/symbol_editor_edit_tool.cpp index 632c49b843..f77cf56f8c 100644 --- a/eeschema/tools/symbol_editor_edit_tool.cpp +++ b/eeschema/tools/symbol_editor_edit_tool.cpp @@ -95,8 +95,8 @@ bool SYMBOL_EDITOR_EDIT_TOOL::Init() moveMenu.AddSeparator( 200 ); moveMenu.AddItem( EE_ACTIONS::rotateCCW, canEdit && EE_CONDITIONS::NotEmpty, 200 ); moveMenu.AddItem( EE_ACTIONS::rotateCW, canEdit && EE_CONDITIONS::NotEmpty, 200 ); - moveMenu.AddItem( EE_ACTIONS::mirrorX, canEdit && EE_CONDITIONS::NotEmpty, 200 ); - moveMenu.AddItem( EE_ACTIONS::mirrorY, canEdit && EE_CONDITIONS::NotEmpty, 200 ); + moveMenu.AddItem( EE_ACTIONS::mirrorV, canEdit && EE_CONDITIONS::NotEmpty, 200 ); + moveMenu.AddItem( EE_ACTIONS::mirrorH, canEdit && EE_CONDITIONS::NotEmpty, 200 ); moveMenu.AddItem( EE_ACTIONS::properties, canEdit && EE_CONDITIONS::Count( 1 ), 200 ); @@ -116,8 +116,8 @@ bool SYMBOL_EDITOR_EDIT_TOOL::Init() drawMenu.AddSeparator( 200 ); drawMenu.AddItem( EE_ACTIONS::rotateCCW, canEdit && EE_CONDITIONS::IdleSelection, 200 ); drawMenu.AddItem( EE_ACTIONS::rotateCW, canEdit && EE_CONDITIONS::IdleSelection, 200 ); - drawMenu.AddItem( EE_ACTIONS::mirrorX, canEdit && EE_CONDITIONS::IdleSelection, 200 ); - drawMenu.AddItem( EE_ACTIONS::mirrorY, canEdit && EE_CONDITIONS::IdleSelection, 200 ); + drawMenu.AddItem( EE_ACTIONS::mirrorV, canEdit && EE_CONDITIONS::IdleSelection, 200 ); + drawMenu.AddItem( EE_ACTIONS::mirrorH, canEdit && EE_CONDITIONS::IdleSelection, 200 ); drawMenu.AddItem( EE_ACTIONS::properties, canEdit && EE_CONDITIONS::Count( 1 ), 200 ); @@ -126,8 +126,8 @@ bool SYMBOL_EDITOR_EDIT_TOOL::Init() selToolMenu.AddItem( EE_ACTIONS::rotateCCW, canEdit && EE_CONDITIONS::NotEmpty, 200 ); selToolMenu.AddItem( EE_ACTIONS::rotateCW, canEdit && EE_CONDITIONS::NotEmpty, 200 ); - selToolMenu.AddItem( EE_ACTIONS::mirrorX, canEdit && EE_CONDITIONS::NotEmpty, 200 ); - selToolMenu.AddItem( EE_ACTIONS::mirrorY, canEdit && EE_CONDITIONS::NotEmpty, 200 ); + selToolMenu.AddItem( EE_ACTIONS::mirrorV, canEdit && EE_CONDITIONS::NotEmpty, 200 ); + selToolMenu.AddItem( EE_ACTIONS::mirrorH, canEdit && EE_CONDITIONS::NotEmpty, 200 ); selToolMenu.AddItem( EE_ACTIONS::properties, canEdit && EE_CONDITIONS::Count( 1 ), 200 ); @@ -197,7 +197,7 @@ int SYMBOL_EDITOR_EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent ) return 0; wxPoint mirrorPoint; - bool xAxis = ( aEvent.Matches( EE_ACTIONS::mirrorX.MakeEvent() ) ); + bool xAxis = ( aEvent.Matches( EE_ACTIONS::mirrorV.MakeEvent() ) ); LIB_ITEM* item = static_cast( selection.Front() ); if( !item->IsMoving() ) @@ -840,8 +840,8 @@ void SYMBOL_EDITOR_EDIT_TOOL::setTransitions() Go( &SYMBOL_EDITOR_EDIT_TOOL::Rotate, EE_ACTIONS::rotateCW.MakeEvent() ); Go( &SYMBOL_EDITOR_EDIT_TOOL::Rotate, EE_ACTIONS::rotateCCW.MakeEvent() ); - Go( &SYMBOL_EDITOR_EDIT_TOOL::Mirror, EE_ACTIONS::mirrorX.MakeEvent() ); - Go( &SYMBOL_EDITOR_EDIT_TOOL::Mirror, EE_ACTIONS::mirrorY.MakeEvent() ); + Go( &SYMBOL_EDITOR_EDIT_TOOL::Mirror, EE_ACTIONS::mirrorV.MakeEvent() ); + Go( &SYMBOL_EDITOR_EDIT_TOOL::Mirror, EE_ACTIONS::mirrorH.MakeEvent() ); Go( &SYMBOL_EDITOR_EDIT_TOOL::DoDelete, ACTIONS::doDelete.MakeEvent() ); Go( &SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor, ACTIONS::deleteTool.MakeEvent() ); diff --git a/pcbnew/toolbars_footprint_editor.cpp b/pcbnew/toolbars_footprint_editor.cpp index 9b4077ab31..aa65649f1a 100644 --- a/pcbnew/toolbars_footprint_editor.cpp +++ b/pcbnew/toolbars_footprint_editor.cpp @@ -75,6 +75,13 @@ void FOOTPRINT_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->Add( ACTIONS::zoomFitScreen ); m_mainToolBar->Add( ACTIONS::zoomTool, ACTION_TOOLBAR::TOGGLE, ACTION_TOOLBAR::CANCEL ); + m_mainToolBar->AddScaledSeparator( this ); + m_mainToolBar->Add( PCB_ACTIONS::rotateCcw ); + m_mainToolBar->Add( PCB_ACTIONS::rotateCw ); + m_mainToolBar->Add( PCB_ACTIONS::mirror ); + m_mainToolBar->Add( PCB_ACTIONS::group ); + m_mainToolBar->Add( PCB_ACTIONS::ungroup ); + m_mainToolBar->AddScaledSeparator( this ); m_mainToolBar->Add( PCB_ACTIONS::footprintProperties ); m_mainToolBar->Add( PCB_ACTIONS::defaultPadProperties ); diff --git a/pcbnew/toolbars_pcb_editor.cpp b/pcbnew/toolbars_pcb_editor.cpp index 46f2ac9a1b..98141deade 100644 --- a/pcbnew/toolbars_pcb_editor.cpp +++ b/pcbnew/toolbars_pcb_editor.cpp @@ -256,6 +256,14 @@ void PCB_EDIT_FRAME::ReCreateHToolbar() m_mainToolBar->Add( ACTIONS::zoomFitObjects ); m_mainToolBar->Add( ACTIONS::zoomTool, ACTION_TOOLBAR::TOGGLE, ACTION_TOOLBAR::CANCEL ); + m_mainToolBar->AddScaledSeparator( this ); + m_mainToolBar->Add( PCB_ACTIONS::rotateCcw ); + m_mainToolBar->Add( PCB_ACTIONS::rotateCw ); + m_mainToolBar->Add( PCB_ACTIONS::group ); + m_mainToolBar->Add( PCB_ACTIONS::ungroup ); + m_mainToolBar->Add( PCB_ACTIONS::lock ); + m_mainToolBar->Add( PCB_ACTIONS::unlock ); + m_mainToolBar->AddScaledSeparator( this ); m_mainToolBar->Add( ACTIONS::showFootprintEditor ); m_mainToolBar->Add( ACTIONS::showFootprintBrowser ); diff --git a/pcbnew/tools/group_tool.cpp b/pcbnew/tools/group_tool.cpp index b8b766673c..b7d63955cd 100644 --- a/pcbnew/tools/group_tool.cpp +++ b/pcbnew/tools/group_tool.cpp @@ -40,9 +40,9 @@ public: SetIcon( group_xpm ); // fixme SetTitle( _( "Grouping" ) ); - Add( PCB_ACTIONS::groupCreate ); - Add( PCB_ACTIONS::groupUngroup ); - Add( PCB_ACTIONS::groupRemoveItems ); + Add( PCB_ACTIONS::group ); + Add( PCB_ACTIONS::ungroup ); + Add( PCB_ACTIONS::removeFromGroup ); Add( PCB_ACTIONS::groupEnter ); } @@ -64,10 +64,10 @@ private: BOARD::GroupLegalOpsField legalOps = board->GroupLegalOps( selection ); - Enable( PCB_ACTIONS::groupCreate.GetUIId(), legalOps.create ); - Enable( PCB_ACTIONS::groupUngroup.GetUIId(), legalOps.ungroup ); - Enable( PCB_ACTIONS::groupRemoveItems.GetUIId(), legalOps.removeItems ); - Enable( PCB_ACTIONS::groupEnter.GetUIId(), legalOps.enter ); + Enable( PCB_ACTIONS::group.GetUIId(), legalOps.create ); + Enable( PCB_ACTIONS::ungroup.GetUIId(), legalOps.ungroup ); + Enable( PCB_ACTIONS::removeFromGroup.GetUIId(), legalOps.removeItems ); + Enable( PCB_ACTIONS::groupEnter.GetUIId(), legalOps.enter ); } }; @@ -378,9 +378,9 @@ void GROUP_TOOL::setTransitions() Go( &GROUP_TOOL::GroupProperties, PCB_ACTIONS::groupProperties.MakeEvent() ); Go( &GROUP_TOOL::PickNewMember, PCB_ACTIONS::pickNewGroupMember.MakeEvent() ); - Go( &GROUP_TOOL::Group, PCB_ACTIONS::groupCreate.MakeEvent() ); - Go( &GROUP_TOOL::Ungroup, PCB_ACTIONS::groupUngroup.MakeEvent() ); - Go( &GROUP_TOOL::RemoveFromGroup, PCB_ACTIONS::groupRemoveItems.MakeEvent() ); + Go( &GROUP_TOOL::Group, PCB_ACTIONS::group.MakeEvent() ); + Go( &GROUP_TOOL::Ungroup, PCB_ACTIONS::ungroup.MakeEvent() ); + Go( &GROUP_TOOL::RemoveFromGroup, PCB_ACTIONS::removeFromGroup.MakeEvent() ); Go( &GROUP_TOOL::EnterGroup, PCB_ACTIONS::groupEnter.MakeEvent() ); Go( &GROUP_TOOL::LeaveGroup, PCB_ACTIONS::groupLeave.MakeEvent() ); } diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index e6630da061..556deba174 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -648,17 +648,17 @@ TOOL_ACTION PCB_ACTIONS::unlock( "pcbnew.EditorControl.unlock", _( "Unlock" ), "", unlocked_xpm ); -TOOL_ACTION PCB_ACTIONS::groupCreate( "pcbnew.EditorControl.groupCreate", +TOOL_ACTION PCB_ACTIONS::group( "pcbnew.EditorControl.group", AS_GLOBAL, 0, "", _( "Group" ), _( "Add the selected items to a new group" ), - group_add_xpm ); + group_xpm ); -TOOL_ACTION PCB_ACTIONS::groupUngroup( "pcbnew.EditorControl.groupUngroup", +TOOL_ACTION PCB_ACTIONS::ungroup( "pcbnew.EditorControl.ungroup", AS_GLOBAL, 0, "", _( "Ungroup" ), "", - group_ungroup_xpm ); + ungroup_xpm ); -TOOL_ACTION PCB_ACTIONS::groupRemoveItems( "pcbnew.EditorControl.groupRemoveItems", +TOOL_ACTION PCB_ACTIONS::removeFromGroup( "pcbnew.EditorControl.removeFromGroup", AS_GLOBAL, 0, "", _( "Remove Items" ), _( "Remove items from group" ), group_remove_xpm ); diff --git a/pcbnew/tools/pcb_actions.h b/pcbnew/tools/pcb_actions.h index 282d58c0d0..5d985d5a86 100644 --- a/pcbnew/tools/pcb_actions.h +++ b/pcbnew/tools/pcb_actions.h @@ -420,9 +420,9 @@ public: static TOOL_ACTION unlock; // Grouping - static TOOL_ACTION groupCreate; - static TOOL_ACTION groupUngroup; - static TOOL_ACTION groupRemoveItems; + static TOOL_ACTION group; + static TOOL_ACTION ungroup; + static TOOL_ACTION removeFromGroup; static TOOL_ACTION groupEnter; static TOOL_ACTION groupLeave;