kicad/pcbnew
Mikolaj Wielgus d7a95e2af4 Rotate FP_TEST properly when flipping
The angle was `-angle` instead of `180 deg - angle` when flipping top to
bottom.

Fixing that, in turn, created some problems with justification, which
was modified both by `FP_TEXT::Flip()` and `FP_TEXT::KeepUpright()`.

What's worse, `FP_TEXT` has another mechanism for keeping the text
upright: `FP_TEXT::GetDrawRotation()` returns different angles if the
"keep upright" flag is set. But there is no analogous behavior for
justification, so the text would sometimes get shifted, and sometimes
not, depending on which mechanism was engaged. And both are used,
apparently.

Clearly, such an arrangement an open invitation to bugs and
inconsistencies. One of these mechanisms should be removed. I haven't
done this yet, and would prefer to postpone this until V6 is out.

I've fixed the justification problems, but this was by trial-and-error,
and I don't feel I really understand the behavior responsible. But I
think it's a good sign that most of my changes are line removals, not
additions. Flipping is a simple operation, it's just mirroring and layer
change. If something simple has a complicated routine, then it's
probably full of hacks.

Fixes https://gitlab.com/kicad/code/kicad/issues/7289
2021-04-02 21:13:21 +00:00
..
autorouter Rationalize footprint bounding boxes and cache all of them. 2021-02-26 13:50:27 +00:00
board_stackup_manager Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
connectivity Fix connectivity to only resolve conflicts on netlist load 2021-03-23 17:43:24 -04:00
dialogs Split lib tree initialization into a two-pass affair. 2021-04-01 10:51:29 +01:00
drc Another try a allowing touching courtyards. 2021-03-31 22:54:30 +01:00
exporters Excellon drill files: slightly change comments inside files 2021-04-01 07:38:00 +02:00
import_gfx Fix minor Coverity warnings 2021-03-25 09:12:24 +01:00
microwave Rationalize footprint bounding boxes and cache all of them. 2021-02-26 13:50:27 +00:00
netlist_reader Make moving pads independent of footprint much harder with new setting 2021-03-31 18:28:18 +00:00
plugins CADSTAR PCB: Fix incorrect solder mask/paste clearance 2021-03-30 13:03:56 +00:00
python Fix pcbnewshell not showing namespace inspector tools 2021-03-02 17:12:57 +00:00
ratsnest Don't show ratsnest on layers hidden by contrast mode 2021-02-23 20:07:46 -05:00
router Fix state issue in router's switch layer handling. 2021-04-01 18:10:04 +01:00
specctra_import_export Pcbnew: add footprint keepouts to Specctra DSN exporter. 2021-03-10 07:18:37 -05:00
swig Code style 2021-03-24 18:11:32 -04:00
tools Pcbnew: Do not move footprint fields twice in align/distribution tools 2021-04-02 21:09:36 +00:00
widgets Force update of some text when activation status changes 2021-03-26 15:50:56 +00:00
CMakeLists.txt pcbnew: fix the i18n of the rules syntax help 2021-03-27 16:26:13 +00:00
Doxyfile_python
Doxyfile_xml
action_plugin.cpp Code style 2021-03-24 18:11:32 -04:00
action_plugin.h Code style 2021-03-24 18:11:32 -04:00
array_creator.cpp MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
array_creator.h Make distinction between PCBNew-wide tools and Board-specific tools. 2020-12-16 13:32:46 +00:00
array_pad_name_provider.cpp MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
array_pad_name_provider.h More cleanup of MODULE to see if it fixes SWIG error. 2020-11-13 21:07:36 +00:00
board.cpp Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
board.h Add insideFrontCourtyard and insideBackCourtyard DRC functions. 2021-03-20 21:53:30 +00:00
board_commit.cpp Fix connectivity to only resolve conflicts on netlist load 2021-03-23 17:43:24 -04:00
board_commit.h Fix connectivity to only resolve conflicts on netlist load 2021-03-23 17:43:24 -04:00
board_connected_item.cpp Comments. 2021-03-01 11:12:51 +00:00
board_connected_item.h Fix the last of broken Doxygen comment specifiers. 2021-01-27 17:39:44 -05:00
board_design_settings.cpp More complete fix for crasher JP found. 2021-03-05 15:30:52 +00:00
board_item.cpp Implement GetEffectiveShape() for PCB_TARGET_Ts. 2020-11-24 20:21:40 +00:00
board_item_container.h Add bulk add/remove mode flag to the BOARD_LISTENER 2020-12-07 22:04:13 -05:00
board_items_to_polygon_shape_transform.cpp Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
build_BOM_from_board.cpp Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
cleanup_item.cpp more cleanup about removing useless include 2020-10-02 14:51:11 +02:00
cleanup_item.h Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
collectors.cpp Show dragging tools in context selection menu for components 2021-01-27 19:55:42 +00:00
collectors.h Show dragging tools in context selection menu for components 2021-01-27 19:55:42 +00:00
convert_drawsegment_list_to_polygon.cpp Don't treat success == true as "we got an outline". 2021-02-10 12:38:06 +00:00
convert_drawsegment_list_to_polygon.h Separate polygonization error from chaining error. 2020-12-24 21:02:14 +00:00
cross-probing.cpp Use a worker thread to send socket commands 2021-03-23 03:20:40 +00:00
dimension.cpp Pcbnew: fix dimensions text rotation and position. 2021-03-15 15:44:36 +00:00
dimension.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
edit.cpp Formatting. 2021-03-16 12:07:06 +00:00
edit_track_width.cpp Fix change in preference panel name. 2021-02-17 14:08:53 +00:00
edit_zone_helpers.cpp Do not auto-refill zones when added or edited 2021-03-21 20:13:20 +00:00
files.cpp Minor cleanup. 2021-04-01 11:10:01 +01:00
footprint.cpp Another try a allowing touching courtyards. 2021-03-31 22:54:30 +01:00
footprint.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
footprint_edit_frame.cpp Don't force an entire refresh of toolbars to update sizes 2021-04-02 19:12:21 +01:00
footprint_edit_frame.h Ensure toolbar controls have the correct width on frame creation 2021-03-28 13:07:56 +01:00
footprint_editor_settings.cpp Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
footprint_editor_utils.cpp Fix another case of treating a modal return result as a bool. 2021-02-20 18:22:34 +00:00
footprint_info_impl.cpp Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
footprint_info_impl.h Replace wxTextFile for writing fp info cache 2020-12-10 21:34:40 -05:00
footprint_libraries_utils.cpp Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
footprint_preview_panel.cpp Used cached footprints without check in preview 2021-02-25 15:46:52 -08:00
footprint_preview_panel.h Remove multi-threading for footprint loading. 2020-12-21 22:03:24 +00:00
footprint_tree_pane.cpp Split lib tree initialization into a two-pass affair. 2021-04-01 10:51:29 +01:00
footprint_tree_pane.h
footprint_viewer_frame.cpp Make moving pads independent of footprint much harder with new setting 2021-03-31 18:28:18 +00:00
footprint_viewer_frame.h More Undo/Redo Cleanup. 2021-02-12 11:26:48 -08:00
footprint_wizard.cpp
footprint_wizard.h MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
footprint_wizard_frame.cpp Remove ACTIONS::TranslateLegacyId and TOOL_DISPATCHER::DispatchWxCommand 2021-03-30 23:20:22 +00:00
footprint_wizard_frame.h More Undo/Redo Cleanup. 2021-02-12 11:26:48 -08:00
footprint_wizard_frame_functions.cpp FOOTPRINT_WIZARD_FRAME: minor fixes. 2021-02-06 08:10:13 +01:00
fp_shape.cpp Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
fp_shape.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
fp_text.cpp Rotate FP_TEST properly when flipping 2021-04-02 21:13:21 +00:00
fp_text.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
fp_text_grid_table.cpp Whack-a-mole on another case of "module". 2021-02-03 10:53:24 +00:00
fp_text_grid_table.h Whack-a-mole on another case of "module". 2021-02-03 10:53:24 +00:00
fp_tree_model_adapter.cpp Fix library tree behavior when duplicate project table entry is disabled. 2021-01-11 07:46:07 -05:00
fp_tree_model_adapter.h Formatting and naming conventions. 2020-11-07 18:50:30 +00:00
fp_tree_synchronizing_adapter.cpp Handle exceptions thrown by footprint library table 2021-03-21 11:43:24 -04:00
fp_tree_synchronizing_adapter.h Formatting and naming conventions. 2020-11-07 18:50:30 +00:00
generate_footprint_info.cpp Handle doc urls enclosed in parens. 2021-03-22 21:20:54 +00:00
generate_footprint_info.h
graphics_cleaner.cpp Mostly formatting cleanup but a few type-casting cleanups too. 2020-11-24 22:16:41 +00:00
graphics_cleaner.h MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
grid_layer_box_helpers.cpp Don't reset focus flag yet on non-GTK platforms. It's required. 2021-02-23 17:46:15 +00:00
grid_layer_box_helpers.h Dismiss the layer selector grid combobox when it loses focus 2020-10-10 15:24:35 +01:00
initpcb.cpp Formatting. 2021-02-20 15:09:47 +00:00
invoke_pcb_dialog.h MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
io_mgr.cpp pcbnew: Add Fabmaster import 2021-01-16 14:28:33 -08:00
io_mgr.h Fp editor: do not change item UUIDs when loading a footprint from library. 2021-03-30 12:58:22 +02:00
kicad_clipboard.cpp Fix typo 2021-02-03 01:55:05 +00:00
kicad_clipboard.h Remove shadowing of identical base m_parser member 2021-01-31 12:56:27 -05:00
load_select_footprint.cpp Fp editor: do not change item UUIDs when loading a footprint from library. 2021-03-30 12:58:22 +02:00
menubar_footprint_editor.cpp Add "Hide Tree" context menu options when tree has no selection. 2021-03-29 12:02:00 +01:00
menubar_pcb_editor.cpp Pcbnew: load write board netlist to file tool action dynamically. 2021-03-29 09:04:55 -04:00
netinfo.h Fix the last of broken Doxygen comment specifiers. 2021-01-27 17:39:44 -05:00
netinfo_item.cpp Fix minor compil warnings. 2020-12-08 18:28:03 +01:00
netinfo_list.cpp Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
pad.cpp Fp editor: do not change item UUIDs when loading a footprint from library. 2021-03-30 12:58:22 +02:00
pad.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
pad_custom_shape_functions.cpp Make sure custom shaped pad primitives get their parents set. 2021-02-24 22:53:58 +00:00
pad_naming.cpp D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
pad_naming.h D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
pcb_base_edit_frame.cpp Fix crash launching footprint editor frame 2021-03-27 23:48:07 -04:00
pcb_base_edit_frame.h Force update of some text when activation status changes 2021-03-26 15:50:56 +00:00
pcb_base_frame.cpp Reduce scope of some view repaints to improve performance 2021-03-14 11:42:09 -04:00
pcb_display_options.cpp Improve naming. 2021-03-16 12:07:06 +00:00
pcb_draw_panel_gal.cpp Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
pcb_draw_panel_gal.h Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
pcb_edit_frame.cpp Remove ACTIONS::TranslateLegacyId and TOOL_DISPATCHER::DispatchWxCommand 2021-03-30 23:20:22 +00:00
pcb_edit_frame.h Pcbnew: load write board netlist to file tool action dynamically. 2021-03-29 09:04:55 -04:00
pcb_expr_evaluator.cpp Update diff pair rule syntax to be clearer. 2021-03-25 10:29:38 +00:00
pcb_expr_evaluator.h Performance improvements for DRC rules. 2021-01-11 22:09:36 +00:00
pcb_group.cpp ADDED: pcbnew - stackup / characteristics table 2021-03-13 20:19:46 +00:00
pcb_layer_box_selector.cpp Ensure the layer dropdowns are correctly sized 2021-04-02 21:33:31 +01:00
pcb_layer_box_selector.h
pcb_marker.cpp Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
pcb_marker.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
pcb_origin_transforms.cpp Add more consts all over the place 2020-10-27 11:03:35 +00:00
pcb_origin_transforms.h Add more consts all over the place 2020-10-27 11:03:35 +00:00
pcb_painter.cpp Fix yet another edge case in B&W printing of holes. 2021-03-18 23:50:04 +00:00
pcb_painter.h Only apply B&W printer fixes when printing. 2021-02-02 15:37:30 +00:00
pcb_plot_params.cpp Remove unused line width option 2021-02-06 06:44:53 -08:00
pcb_plot_params.h Remove unused line width option 2021-02-06 06:44:53 -08:00
pcb_plot_params_parser.h
pcb_screen.cpp more cleanup about removing useless include 2020-10-02 14:51:11 +02:00
pcb_shape.cpp Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
pcb_shape.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
pcb_target.cpp Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
pcb_target.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
pcb_text.cpp Pcbnew: Remove 180 deg rotation when flipping PCB_TEXT in some cases 2021-04-02 21:13:21 +00:00
pcb_text.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
pcb_view.cpp Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
pcb_view.h Cleanup (no functional changes). 2021-03-19 16:14:34 +00:00
pcbnew.cpp Add missing include 2021-03-22 21:25:03 -04:00
pcbnew.h Minor code cleanup, step3: remove more useless include. 2020-10-01 18:28:12 +02:00
pcbnew.icns Update icon resource sets 2020-12-22 15:16:33 -08:00
pcbnew_config.cpp Make sure projects get created for boards migrated from 5.x 2021-03-21 16:21:44 -04:00
pcbnew_config.h
pcbnew_doc.icns Update icon resource sets 2020-12-22 15:16:33 -08:00
pcbnew_id.h Move the import graphics menu item to the action 2021-03-27 19:04:16 +00:00
pcbnew_printout.cpp Set unprinted layer colors to background. 2021-02-25 14:23:02 +00:00
pcbnew_printout.h Fix the last of broken Doxygen comment specifiers. 2021-01-27 17:39:44 -05:00
pcbnew_settings.cpp Make moving pads independent of footprint much harder with new setting 2021-03-31 18:28:18 +00:00
pcbnew_settings.h Make moving pads independent of footprint much harder with new setting 2021-03-31 18:28:18 +00:00
pcbplot.cpp Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
pcbplot.h Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
plot_board_layers.cpp Added a lot of consts and refactored a few lines 2021-03-08 12:49:48 -08:00
plot_brditems_plotter.cpp Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
plotcontroller.h
plugin.cpp Fp editor: do not change item UUIDs when loading a footprint from library. 2021-03-30 12:58:22 +02:00
sel_layer.cpp Cancel placement of via if user cancels layer selection. 2021-02-18 11:53:36 +00:00
toolbars_footprint_editor.cpp Ensure the layer dropdowns are correctly sized 2021-04-02 21:33:31 +01:00
toolbars_footprint_viewer.cpp Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
toolbars_pcb_editor.cpp Ensure the layer dropdowns are correctly sized 2021-04-02 21:33:31 +01:00
track.cpp Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
track.h Rework bitmap system to load from archived PNGs 2021-03-11 08:37:35 -05:00
tracks_cleaner.cpp Honor locking in cleanup ops 2021-02-16 10:20:45 -08:00
tracks_cleaner.h Consider tracks and vias together 2021-01-08 09:35:58 -08:00
undo_redo.cpp Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
zone.cpp Remove ZONE::ClearFilledPolysList() and fix ZONE::Unfill() 2021-03-21 20:13:20 +00:00
zone.h Remove ZONE::ClearFilledPolysList() and fix ZONE::Unfill() 2021-03-21 20:13:20 +00:00
zone_filler.cpp Make sure layer gets passed in to rules evaluation. 2021-02-08 14:53:49 +00:00
zone_filler.h Fix issues with zone filling connectivity locking 2021-01-18 13:22:12 -05:00
zone_settings.cpp Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
zone_settings.h Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
zones.h Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
zones_functions_for_undo_redo.cpp Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
zones_functions_for_undo_redo.h