From 404bfdcf306299a878efc4569610cd072e421561 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 13 Sep 2013 11:28:47 +0200 Subject: [PATCH] Changed VIEW::PrepareTargets() to more appropriate name VIEW::ClearTargets(). Added SELECTION layer to always-on-top list. --- common/drawpanel_gal.cpp | 5 ++--- common/view/view.cpp | 2 +- include/view/view.h | 4 ++-- pcbnew/pcbframe.cpp | 6 ++++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 2d169b37db..7087d1e86d 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -131,7 +131,7 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); m_gal->ClearScreen(); - m_view->PrepareTargets(); + m_view->ClearTargets(); // Grid has to be redrawn only when the NONCACHED target is redrawn if( m_view->IsTargetDirty( KiGfx::TARGET_NONCACHED ) ) m_gal->DrawGrid(); @@ -240,8 +240,7 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) m_eventDispatcher->DispatchWxEvent( aEvent ); } -// if( m_view->IsDirty() ) - Refresh(); + Refresh(); } diff --git a/common/view/view.cpp b/common/view/view.cpp index a24b7ac4e5..8531688714 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -714,7 +714,7 @@ void VIEW::Clear() } -void VIEW::PrepareTargets() +void VIEW::ClearTargets() { if( IsTargetDirty( TARGET_CACHED ) || IsTargetDirty( TARGET_NONCACHED ) ) { diff --git a/include/view/view.h b/include/view/view.h index c5146d3540..8d4329b3d9 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -377,10 +377,10 @@ public: void UpdateAllLayersOrder(); /** - * Function PrepareTargets() + * Function ClearTargets() * Clears targets that are marked as dirty. */ - void PrepareTargets(); + void ClearTargets(); /** * Function Redraw() diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index b970df681f..bf15c21989 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -767,7 +767,8 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) LAYER_NUM layers[] = { GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + ITEM_GAL_LAYER( SELECTION ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) @@ -806,7 +807,8 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer ) LAYER_NUM layers[] = { GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + ITEM_GAL_LAYER( SELECTION ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i )