Fix repaints getting done after the wrong dialog.
This commit is contained in:
parent
c4e133fdf7
commit
b7c9a1ad55
|
@ -58,6 +58,7 @@
|
|||
#include <tool/grid_menu.h>
|
||||
#include "cleanup_item.h"
|
||||
#include <zoom_defines.h>
|
||||
#include <ratsnest/ratsnest_view_item.h>
|
||||
|
||||
#if defined( KICAD_USE_3DCONNEXION )
|
||||
#include <navlib/nl_pcbnew_plugin.h>
|
||||
|
@ -890,6 +891,26 @@ void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
|
|||
|
||||
renderSettings->LoadColors( GetColorSettings( true ) );
|
||||
renderSettings->LoadDisplayOptions( GetDisplayOptions() );
|
||||
|
||||
GetCanvas()->GetView()->UpdateAllItemsConditionally( KIGFX::REPAINT,
|
||||
[&]( KIGFX::VIEW_ITEM* aItem ) -> bool
|
||||
{
|
||||
if( dynamic_cast<RATSNEST_VIEW_ITEM*>( aItem ) )
|
||||
{
|
||||
return true; // ratsnest display
|
||||
}
|
||||
else if( dynamic_cast<PCB_TRACK*>( aItem ) )
|
||||
{
|
||||
return true; // track, arc & via clearance display
|
||||
}
|
||||
else if( dynamic_cast<PAD*>( aItem ) )
|
||||
{
|
||||
return true; // pad clearance display
|
||||
}
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
GetCanvas()->GetView()->UpdateAllItems( KIGFX::COLOR );
|
||||
|
||||
RecreateToolbars();
|
||||
|
|
|
@ -1014,10 +1014,6 @@ void PCB_EDIT_FRAME::ShowBoardSetupDialog( const wxString& aInitialPage )
|
|||
// Make sure everything's up-to-date
|
||||
GetBoard()->BuildListOfNets();
|
||||
|
||||
PCBNEW_SETTINGS::DISPLAY_OPTIONS* displayOpts = &GetPcbNewSettings()->m_Display;
|
||||
PCBNEW_SETTINGS::DISPLAY_OPTIONS prevDisplayOpts = *displayOpts;
|
||||
#define CHANGED( x ) ( displayOpts->x != prevDisplayOpts.x )
|
||||
|
||||
DIALOG_BOARD_SETUP dlg( this );
|
||||
|
||||
if( !aInitialPage.IsEmpty() )
|
||||
|
@ -1035,24 +1031,8 @@ void PCB_EDIT_FRAME::ShowBoardSetupDialog( const wxString& aInitialPage )
|
|||
GetCanvas()->GetView()->UpdateAllItemsConditionally( KIGFX::REPAINT,
|
||||
[&]( KIGFX::VIEW_ITEM* aItem ) -> bool
|
||||
{
|
||||
if( dynamic_cast<RATSNEST_VIEW_ITEM*>( aItem ) )
|
||||
{
|
||||
return CHANGED( m_RatsnestMode )
|
||||
|| CHANGED( m_ShowGlobalRatsnest )
|
||||
|| CHANGED( m_DisplayRatsnestLinesCurved );
|
||||
}
|
||||
else if( dynamic_cast<PCB_TRACK*>( aItem ) )
|
||||
{
|
||||
return CHANGED( m_PadClearance );
|
||||
}
|
||||
else if( dynamic_cast<PAD*>( aItem ) )
|
||||
{
|
||||
return CHANGED( m_TrackClearance );
|
||||
}
|
||||
else if( dynamic_cast<EDA_TEXT*>( aItem ) )
|
||||
{
|
||||
if( dynamic_cast<EDA_TEXT*>( aItem ) )
|
||||
return true; // text variables
|
||||
}
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
@ -1069,7 +1049,6 @@ void PCB_EDIT_FRAME::ShowBoardSetupDialog( const wxString& aInitialPage )
|
|||
m_toolManager->ProcessEvent( toolEvent );
|
||||
}
|
||||
|
||||
#undef CHANGED
|
||||
GetCanvas()->SetFocus();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue