Fixed linking errors for apps other than pcbnew.
This commit is contained in:
parent
b03f97b991
commit
3962464190
|
@ -143,6 +143,10 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect )
|
|||
m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) );
|
||||
m_gal->ClearScreen();
|
||||
|
||||
m_view->PrepareTargets();
|
||||
// Grid has to be redrawn only when the NONCACHED target is redrawn
|
||||
if( m_view->IsTargetDirty( KiGfx::TARGET_NONCACHED ) )
|
||||
m_gal->DrawGrid();
|
||||
m_view->Redraw();
|
||||
|
||||
m_gal->EndDrawing();
|
||||
|
|
|
@ -546,7 +546,7 @@ void VIEW::redrawRect( const BOX2I& aRect )
|
|||
{
|
||||
BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers )
|
||||
{
|
||||
if( l->enabled && isTargetDirty( l->target ) && areRequiredLayersEnabled( l->id ) )
|
||||
if( l->enabled && IsTargetDirty( l->target ) && areRequiredLayersEnabled( l->id ) )
|
||||
{
|
||||
drawItem drawFunc( this, l );
|
||||
|
||||
|
@ -622,7 +622,7 @@ bool VIEW::IsDirty() const
|
|||
{
|
||||
for( int i = 0; i < TARGETS_NUMBER; ++i )
|
||||
{
|
||||
if( isTargetDirty( i ) )
|
||||
if( IsTargetDirty( i ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -695,14 +695,9 @@ void VIEW::Clear()
|
|||
}
|
||||
|
||||
|
||||
void VIEW::Redraw()
|
||||
void VIEW::PrepareTargets()
|
||||
{
|
||||
VECTOR2D screenSize = m_gal->GetScreenPixelSize();
|
||||
BOX2I rect( ToWorld( VECTOR2D( 0, 0 ) ),
|
||||
ToWorld( screenSize ) - ToWorld( VECTOR2D( 0, 0 ) ) );
|
||||
rect.Normalize();
|
||||
|
||||
if( isTargetDirty( TARGET_CACHED ) || isTargetDirty( TARGET_NONCACHED ) )
|
||||
if( IsTargetDirty( TARGET_CACHED ) || IsTargetDirty( TARGET_NONCACHED ) )
|
||||
{
|
||||
// TARGET_CACHED and TARGET_NONCACHED have to be redrawn together, as they contain
|
||||
// layers that rely on each other (eg. netnames are noncached, but tracks - are cached)
|
||||
|
@ -711,13 +706,21 @@ void VIEW::Redraw()
|
|||
|
||||
MarkTargetDirty( TARGET_NONCACHED );
|
||||
MarkTargetDirty( TARGET_CACHED );
|
||||
|
||||
m_gal->DrawGrid();
|
||||
}
|
||||
|
||||
// Always refresh the overlay
|
||||
MarkTargetDirty( TARGET_OVERLAY );
|
||||
m_gal->ClearTarget( TARGET_OVERLAY );
|
||||
if( IsTargetDirty( TARGET_OVERLAY ) )
|
||||
{
|
||||
m_gal->ClearTarget( TARGET_OVERLAY );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VIEW::Redraw()
|
||||
{
|
||||
VECTOR2D screenSize = m_gal->GetScreenPixelSize();
|
||||
BOX2I rect( ToWorld( VECTOR2D( 0, 0 ) ),
|
||||
ToWorld( screenSize ) - ToWorld( VECTOR2D( 0, 0 ) ) );
|
||||
rect.Normalize();
|
||||
|
||||
redrawRect( rect );
|
||||
|
||||
|
@ -892,7 +895,7 @@ void VIEW::RecacheAllItems( bool aImmediately )
|
|||
}
|
||||
|
||||
|
||||
bool VIEW::isTargetDirty( int aTarget ) const
|
||||
bool VIEW::IsTargetDirty( int aTarget ) const
|
||||
{
|
||||
wxASSERT( aTarget < TARGETS_NUMBER );
|
||||
|
||||
|
|
|
@ -362,6 +362,12 @@ public:
|
|||
*/
|
||||
void UpdateAllLayersOrder();
|
||||
|
||||
/**
|
||||
* Function PrepareTargets()
|
||||
* Clears targets that are marked as dirty.
|
||||
*/
|
||||
void PrepareTargets();
|
||||
|
||||
/**
|
||||
* Function Redraw()
|
||||
* Immediately redraws the whole view.
|
||||
|
@ -397,6 +403,14 @@ public:
|
|||
*/
|
||||
bool IsDirty() const;
|
||||
|
||||
/**
|
||||
* Function IsTargetDirty()
|
||||
* Returns true if any of layers belonging to the target or the target itself should be
|
||||
* redrawn.
|
||||
* @return True if the above condition is fulfilled.
|
||||
*/
|
||||
bool IsTargetDirty( int aTarget ) const;
|
||||
|
||||
/**
|
||||
* Function MarkTargetDirty()
|
||||
* Sets or clears target 'dirty' flag.
|
||||
|
@ -516,14 +530,6 @@ private:
|
|||
return ( m_layers.at( aLayer ).target == TARGET_CACHED );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function isTargetDirty()
|
||||
* Returns true if any of layers belonging to the target or the target itself should be
|
||||
* redrawn.
|
||||
* @return True if the above condition is fulfilled.
|
||||
*/
|
||||
bool isTargetDirty( int aTarget ) const;
|
||||
|
||||
///* Whether to use rendering order modifier or not
|
||||
bool m_enableOrderModifier;
|
||||
|
||||
|
|
Loading…
Reference in New Issue