mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-19 18:31:40 +00:00
Pcbnew: make 'Flip board items' option more clear
CHANGED: The 'Filp board items' checkbox in the 'PCB Editing Options' was changed to a radio box. Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16652
This commit is contained in:
parent
4e2162fc97
commit
3066ad2088
eeschema
include/settings
pcbnew/dialogs
@ -95,13 +95,13 @@ void SCH_SHAPE::Normalize()
|
||||
|
||||
void SCH_SHAPE::MirrorHorizontally( int aCenter )
|
||||
{
|
||||
flip( VECTOR2I( aCenter, 0 ), true );
|
||||
flip( VECTOR2I( aCenter, 0 ), FLIP_DIRECTION::LEFT_RIGHT );
|
||||
}
|
||||
|
||||
|
||||
void SCH_SHAPE::MirrorVertically( int aCenter )
|
||||
{
|
||||
flip( VECTOR2I( 0, aCenter ), false );
|
||||
flip( VECTOR2I( 0, aCenter ), FLIP_DIRECTION::TOP_BOTTOM );
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,6 +54,15 @@ enum class ARC_EDIT_MODE
|
||||
KEEP_ENDPOINTS_OR_START_DIRECTION
|
||||
};
|
||||
|
||||
/**
|
||||
* Settings for board items flip. Used by pcbnew
|
||||
*/
|
||||
enum class FLIP_DIRECTION
|
||||
{
|
||||
LEFT_RIGHT,
|
||||
TOP_BOTTOM
|
||||
};
|
||||
|
||||
/**
|
||||
* Stores the window positioning/state
|
||||
*/
|
||||
|
@ -65,7 +65,9 @@ void PANEL_EDIT_OPTIONS::loadPCBSettings( PCBNEW_SETTINGS* aCfg )
|
||||
m_rotationAngle.SetAngleValue( aCfg->m_RotationAngle );
|
||||
m_arcEditMode->SetSelection( (int) aCfg->m_ArcEditMode );
|
||||
m_trackMouseDragCtrl->SetSelection( (int) aCfg->m_TrackDragAction );
|
||||
m_flipLeftRight->SetValue( aCfg->m_FlipLeftRight );
|
||||
FLIP_DIRECTION flipDirection =
|
||||
aCfg->m_FlipLeftRight ? FLIP_DIRECTION::LEFT_RIGHT : FLIP_DIRECTION::TOP_BOTTOM;
|
||||
m_boardItemsFlip->SetSelection( (int) flipDirection );
|
||||
m_allowFreePads->SetValue( aCfg->m_AllowFreePads );
|
||||
m_autoRefillZones->SetValue( aCfg->m_AutoRefillZones );
|
||||
|
||||
@ -151,7 +153,8 @@ bool PANEL_EDIT_OPTIONS::TransferDataFromWindow()
|
||||
cfg->m_RotationAngle = m_rotationAngle.GetAngleValue();
|
||||
cfg->m_ArcEditMode = (ARC_EDIT_MODE) m_arcEditMode->GetSelection();
|
||||
cfg->m_TrackDragAction = (TRACK_DRAG_ACTION) m_trackMouseDragCtrl->GetSelection();
|
||||
cfg->m_FlipLeftRight = m_flipLeftRight->GetValue();
|
||||
FLIP_DIRECTION flipDirection = (FLIP_DIRECTION) m_boardItemsFlip->GetSelection();
|
||||
cfg->m_FlipLeftRight = ( flipDirection == FLIP_DIRECTION::LEFT_RIGHT );
|
||||
cfg->m_AllowFreePads = m_allowFreePads->GetValue();
|
||||
cfg->m_AutoRefillZones = m_autoRefillZones->GetValue();
|
||||
|
||||
|
@ -80,8 +80,17 @@ PANEL_EDIT_OPTIONS_BASE::PANEL_EDIT_OPTIONS_BASE( wxWindow* parent, wxWindowID i
|
||||
m_trackMouseDragCtrl->SetSelection( 0 );
|
||||
m_sizerBoardEdit->Add( m_trackMouseDragCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_flipLeftRight = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Flip board items left/right (default is top/bottom)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_sizerBoardEdit->Add( m_flipLeftRight, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_sizerBoardEdit->Add( 0, 3, 1, wxEXPAND, 5 );
|
||||
|
||||
wxString m_boardItemsFlipChoices[] = { _("Left/right"), _("Top/bottom") };
|
||||
int m_boardItemsFlipNChoices = sizeof( m_boardItemsFlipChoices ) / sizeof( wxString );
|
||||
m_boardItemsFlip = new wxRadioBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Board items flip"), wxDefaultPosition, wxDefaultSize, m_boardItemsFlipNChoices, m_boardItemsFlipChoices, 1, wxRA_SPECIFY_ROWS );
|
||||
m_boardItemsFlip->SetSelection( 0 );
|
||||
m_sizerBoardEdit->Add( m_boardItemsFlip, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_sizerBoardEdit->Add( 0, 3, 1, wxEXPAND, 5 );
|
||||
|
||||
m_allowFreePads = new wxCheckBox( bOptionsSizer->GetStaticBox(), wxID_ANY, _("Allow free pads"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_allowFreePads->SetToolTip( _("If checked, pads can be moved with respect to the rest of the footprint.") );
|
||||
|
@ -649,11 +649,21 @@
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="false">
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="true">
|
||||
<property name="height">3</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="false">
|
||||
<object class="wxRadioBox" expanded="true">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
@ -667,7 +677,7 @@
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="choices">"Left/right" "Top/bottom"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
@ -683,7 +693,8 @@
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Flip board items left/right (default is top/bottom)</property>
|
||||
<property name="label">Board items flip</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
@ -691,7 +702,7 @@
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_flipLeftRight</property>
|
||||
<property name="name">m_boardItemsFlip</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
@ -699,10 +710,11 @@
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="style">wxRA_SPECIFY_ROWS</property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
@ -714,6 +726,16 @@
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="true">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="true">
|
||||
<property name="height">3</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="false">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT</property>
|
||||
|
@ -21,9 +21,9 @@
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/simplebook.h>
|
||||
@ -47,7 +47,7 @@ class PANEL_EDIT_OPTIONS_BASE : public RESETTABLE_PANEL
|
||||
wxBoxSizer* m_sizerBoardEdit;
|
||||
wxStaticText* m_trackMouseDragLabel;
|
||||
wxChoice* m_trackMouseDragCtrl;
|
||||
wxCheckBox* m_flipLeftRight;
|
||||
wxRadioBox* m_boardItemsFlip;
|
||||
wxCheckBox* m_allowFreePads;
|
||||
wxStaticBoxSizer* m_mouseCmdsWinLin;
|
||||
wxStaticText* m_staticText181;
|
||||
|
Loading…
Reference in New Issue
Block a user