Loading include/view/view.h +15 −0 Original line number Diff line number Diff line Loading @@ -292,6 +292,8 @@ public: */ inline void SetLayerVisible( int aLayer, bool aVisible = true ) { wxASSERT( aLayer < (int) m_layers.size() ); if( m_layers[aLayer].visible != aVisible ) { // Target has to be redrawn after changing its visibility Loading @@ -307,9 +309,18 @@ public: */ inline bool IsLayerVisible( int aLayer ) const { wxASSERT( aLayer < (int) m_layers.size() ); return m_layers.at( aLayer ).visible; } inline void SetLayerDisplayOnly( int aLayer, bool aDisplayOnly = true ) { wxASSERT( aLayer < (int) m_layers.size() ); m_layers[aLayer].displayOnly = aDisplayOnly; } /** * Function SetLayerTarget() * Changes the rendering target for a particular layer. Loading @@ -318,6 +329,8 @@ public: */ inline void SetLayerTarget( int aLayer, RENDER_TARGET aTarget ) { wxASSERT( aLayer < (int) m_layers.size() ); m_layers[aLayer].target = aTarget; } Loading Loading @@ -477,6 +490,8 @@ public: /// Returns true if the layer is cached inline bool IsCached( int aLayer ) const { wxASSERT( aLayer < (int) m_layers.size() ); return m_layers.at( aLayer ).target == TARGET_CACHED; } Loading pcbnew/pcb_draw_panel_gal.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -123,10 +123,12 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType ) // Netnames are drawn only when scale is sufficient (level of details) // so there is no point in caching them m_view->SetLayerTarget( layer, KIGFX::TARGET_NONCACHED ); m_view->SetLayerDisplayOnly( layer ); } } m_view->SetLayerTarget( ITEM_GAL_LAYER( ANCHOR_VISIBLE ), KIGFX::TARGET_NONCACHED ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( ANCHOR_VISIBLE ) ); // Some more required layers settings m_view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ) ); Loading @@ -147,7 +149,13 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType ) m_view->SetRequired( ITEM_GAL_LAYER( PAD_BK_VISIBLE ), ITEM_GAL_LAYER( MOD_BK_VISIBLE ) ); m_view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( GP_OVERLAY ) ); m_view->SetLayerTarget( ITEM_GAL_LAYER( RATSNEST_VISIBLE ), KIGFX::TARGET_OVERLAY ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( RATSNEST_VISIBLE ) ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( WORKSHEET ) ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( GRID_VISIBLE ) ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( DRC_VISIBLE ) ); // Load display options (such as filled/outline display of items). // Can be made only if the parent windos is a EDA_DRAW_FRAME (or a derived class) Loading Loading
include/view/view.h +15 −0 Original line number Diff line number Diff line Loading @@ -292,6 +292,8 @@ public: */ inline void SetLayerVisible( int aLayer, bool aVisible = true ) { wxASSERT( aLayer < (int) m_layers.size() ); if( m_layers[aLayer].visible != aVisible ) { // Target has to be redrawn after changing its visibility Loading @@ -307,9 +309,18 @@ public: */ inline bool IsLayerVisible( int aLayer ) const { wxASSERT( aLayer < (int) m_layers.size() ); return m_layers.at( aLayer ).visible; } inline void SetLayerDisplayOnly( int aLayer, bool aDisplayOnly = true ) { wxASSERT( aLayer < (int) m_layers.size() ); m_layers[aLayer].displayOnly = aDisplayOnly; } /** * Function SetLayerTarget() * Changes the rendering target for a particular layer. Loading @@ -318,6 +329,8 @@ public: */ inline void SetLayerTarget( int aLayer, RENDER_TARGET aTarget ) { wxASSERT( aLayer < (int) m_layers.size() ); m_layers[aLayer].target = aTarget; } Loading Loading @@ -477,6 +490,8 @@ public: /// Returns true if the layer is cached inline bool IsCached( int aLayer ) const { wxASSERT( aLayer < (int) m_layers.size() ); return m_layers.at( aLayer ).target == TARGET_CACHED; } Loading
pcbnew/pcb_draw_panel_gal.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -123,10 +123,12 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType ) // Netnames are drawn only when scale is sufficient (level of details) // so there is no point in caching them m_view->SetLayerTarget( layer, KIGFX::TARGET_NONCACHED ); m_view->SetLayerDisplayOnly( layer ); } } m_view->SetLayerTarget( ITEM_GAL_LAYER( ANCHOR_VISIBLE ), KIGFX::TARGET_NONCACHED ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( ANCHOR_VISIBLE ) ); // Some more required layers settings m_view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ) ); Loading @@ -147,7 +149,13 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aGalType ) m_view->SetRequired( ITEM_GAL_LAYER( PAD_BK_VISIBLE ), ITEM_GAL_LAYER( MOD_BK_VISIBLE ) ); m_view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( GP_OVERLAY ) ); m_view->SetLayerTarget( ITEM_GAL_LAYER( RATSNEST_VISIBLE ), KIGFX::TARGET_OVERLAY ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( RATSNEST_VISIBLE ) ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( WORKSHEET ) ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( GRID_VISIBLE ) ); m_view->SetLayerDisplayOnly( ITEM_GAL_LAYER( DRC_VISIBLE ) ); // Load display options (such as filled/outline display of items). // Can be made only if the parent windos is a EDA_DRAW_FRAME (or a derived class) Loading