Make live 3D refresh optional
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8068
This commit is contained in:
parent
d4957b112e
commit
e0f26fd525
|
@ -111,6 +111,7 @@ public:
|
|||
bool m_DisplayInvertXAxis; //< true: Invert the X axis for display
|
||||
bool m_DisplayInvertYAxis; //< true: Invert the Y axis for display
|
||||
|
||||
bool m_Live3DRefresh; ///< If true, 3D viewer will redraw on every modification operation
|
||||
};
|
||||
|
||||
#endif // PCBSTRUCT_H_
|
||||
|
|
|
@ -397,7 +397,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
|
|||
|
||||
if( aSetDirtyBit )
|
||||
frame->OnModify();
|
||||
else
|
||||
else if( frame->GetDisplayOptions().m_Live3DRefresh )
|
||||
frame->Update3DView( true );
|
||||
|
||||
clear();
|
||||
|
|
|
@ -67,6 +67,8 @@ bool PANEL_DISPLAY_OPTIONS::TransferDataToWindow()
|
|||
m_OptDisplayPadNoConn->SetValue( pcbEdit->IsElementVisible( LAYER_NO_CONNECTS ) );
|
||||
m_ShowNetNamesOption->SetSelection( displ_opts.m_DisplayNetNamesMode );
|
||||
|
||||
m_live3Drefresh->SetValue( displ_opts.m_Live3DRefresh );
|
||||
|
||||
CROSS_PROBING_SETTINGS& crossProbing = pcbEdit->GetPcbNewSettings()->m_CrossProbing;
|
||||
|
||||
m_checkCrossProbeCenter->SetValue( crossProbing.center_on_items );
|
||||
|
@ -107,6 +109,7 @@ bool PANEL_DISPLAY_OPTIONS::TransferDataFromWindow()
|
|||
pcbEdit->SetElementVisibility( LAYER_NO_CONNECTS, m_OptDisplayPadNoConn->GetValue() );
|
||||
|
||||
displ_opts.m_DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
|
||||
displ_opts.m_Live3DRefresh = m_live3Drefresh->GetValue();
|
||||
|
||||
pcbEdit->SetDisplayOptions( displ_opts );
|
||||
settings->LoadDisplayOptions( displ_opts, pcbEdit->ShowPageLimits() );
|
||||
|
|
|
@ -87,6 +87,11 @@ PANEL_DISPLAY_OPTIONS_BASE::PANEL_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWind
|
|||
|
||||
sbSizer3->Add( m_checkCrossProbeAutoHighlight, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_live3Drefresh = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Refresh 3D view automatically"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_live3Drefresh->SetToolTip( _("When enabled, edits to the board will cause the 3D view to refresh (may be slow with larger boards)") );
|
||||
|
||||
sbSizer3->Add( m_live3Drefresh, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
pcbOptionsSizer->Add( sbSizer3, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
|
|
@ -800,6 +800,70 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Refresh 3D view automatically</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_live3Drefresh</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">When enabled, edits to the board will cause the 3D view to refresh (may be slow with larger boards)</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -47,6 +47,7 @@ class PANEL_DISPLAY_OPTIONS_BASE : public wxPanel
|
|||
wxCheckBox* m_checkCrossProbeCenter;
|
||||
wxCheckBox* m_checkCrossProbeZoom;
|
||||
wxCheckBox* m_checkCrossProbeAutoHighlight;
|
||||
wxCheckBox* m_live3Drefresh;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -64,4 +64,5 @@ PCB_DISPLAY_OPTIONS::PCB_DISPLAY_OPTIONS()
|
|||
m_DisplayOrigin = PCB_ORIGIN_PAGE;
|
||||
m_DisplayInvertXAxis = false;
|
||||
m_DisplayInvertYAxis = false;
|
||||
m_Live3DRefresh = false;
|
||||
}
|
||||
|
|
|
@ -1203,6 +1203,7 @@ void PCB_EDIT_FRAME::OnModify( )
|
|||
{
|
||||
PCB_BASE_FRAME::OnModify();
|
||||
|
||||
if( GetDisplayOptions().m_Live3DRefresh )
|
||||
Update3DView( true );
|
||||
|
||||
if( !GetTitle().StartsWith( "*" ) )
|
||||
|
@ -1212,6 +1213,12 @@ void PCB_EDIT_FRAME::OnModify( )
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::HardRedraw()
|
||||
{
|
||||
Update3DView( true );
|
||||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::ExportSVG( wxCommandEvent& event )
|
||||
{
|
||||
InvokeExportSVG( this, GetBoard() );
|
||||
|
|
|
@ -124,6 +124,8 @@ public:
|
|||
*/
|
||||
void UpdateUserInterface();
|
||||
|
||||
void HardRedraw() override;
|
||||
|
||||
/**
|
||||
* Execute a remote command send by Eeschema via a socket, port KICAD_PCB_PORT_SERVICE_NUMBER
|
||||
* (currently 4242).
|
||||
|
|
|
@ -191,6 +191,9 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
|||
m_params.emplace_back( new PARAM<bool>( "pcb_display.origin_invert_y_axis",
|
||||
&m_Display.m_DisplayInvertYAxis, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "pcb_display.live_3d_refresh",
|
||||
&m_Display.m_Live3DRefresh, false ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "cleanup.cleanup_vias",
|
||||
&m_Cleanup.cleanup_vias, true ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue