mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-03-30 06:36:55 +00:00
Cleanup VIEW class
Ununsed m_dynamic class variable
This commit is contained in:
parent
10bd1b5c2a
commit
d7137c4a05
common/view
eeschema
gerbview
include/view
pagelayout_editor
pcbnew
@ -237,14 +237,13 @@ void VIEW::OnDestroy( VIEW_ITEM* aItem )
|
||||
}
|
||||
|
||||
|
||||
VIEW::VIEW( bool aIsDynamic ) :
|
||||
VIEW::VIEW() :
|
||||
m_enableOrderModifier( true ),
|
||||
m_scale( 4.0 ),
|
||||
m_minScale( 0.2 ), m_maxScale( 50000.0 ),
|
||||
m_mirrorX( false ), m_mirrorY( false ),
|
||||
m_painter( nullptr ),
|
||||
m_gal( nullptr ),
|
||||
m_dynamic( aIsDynamic ),
|
||||
m_useDrawPriority( false ),
|
||||
m_nextDrawPriority( 0 ),
|
||||
m_reverseDrawOrder( false )
|
||||
|
@ -56,7 +56,7 @@ SCH_DRAW_PANEL::SCH_DRAW_PANEL( wxWindow* aParentWindow, wxWindowID aWindowId,
|
||||
KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType )
|
||||
: EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalType )
|
||||
{
|
||||
m_view = new KIGFX::SCH_VIEW( true, dynamic_cast<SCH_BASE_FRAME*>( GetParentEDAFrame() ) );
|
||||
m_view = new KIGFX::SCH_VIEW( dynamic_cast<SCH_BASE_FRAME*>( GetParentEDAFrame() ) );
|
||||
m_view->SetGAL( m_gal );
|
||||
|
||||
m_gal->SetWorldUnitLength( SCH_WORLD_UNIT );
|
||||
|
@ -47,7 +47,7 @@ SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL( wxWindow* aParentWindow, wxWindowID aWindo
|
||||
KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) :
|
||||
EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalType )
|
||||
{
|
||||
m_view = new KIGFX::SCH_VIEW( true, nullptr );
|
||||
m_view = new KIGFX::SCH_VIEW( nullptr );
|
||||
m_view->SetGAL( m_gal );
|
||||
|
||||
m_gal->SetWorldUnitLength( SCH_WORLD_UNIT );
|
||||
|
@ -45,8 +45,8 @@
|
||||
namespace KIGFX {
|
||||
|
||||
|
||||
SCH_VIEW::SCH_VIEW( bool aIsDynamic, SCH_BASE_FRAME* aFrame ) :
|
||||
VIEW( aIsDynamic )
|
||||
SCH_VIEW::SCH_VIEW( SCH_BASE_FRAME* aFrame ) :
|
||||
VIEW()
|
||||
{
|
||||
m_frame = aFrame;
|
||||
|
||||
|
@ -80,7 +80,7 @@ class SCH_VIEW : public KIGFX::VIEW
|
||||
public:
|
||||
// Note: aFrame is used to know the sheet path name when drawing the drawing sheet.
|
||||
// It can be null.
|
||||
SCH_VIEW( bool aIsDynamic, SCH_BASE_FRAME* aFrame );
|
||||
SCH_VIEW( SCH_BASE_FRAME* aFrame );
|
||||
~SCH_VIEW();
|
||||
|
||||
void Cleanup();
|
||||
|
@ -44,7 +44,7 @@ GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWin
|
||||
GAL_TYPE aGalType ) :
|
||||
EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalType )
|
||||
{
|
||||
m_view = new KIGFX::VIEW( true );
|
||||
m_view = new KIGFX::VIEW();
|
||||
m_view->SetGAL( m_gal );
|
||||
GetGAL()->SetWorldUnitLength( 1.0/gerbIUScale.IU_PER_MM /* 10 nm */ / 25.4 /* 1 inch in mm */ );
|
||||
|
||||
|
@ -71,11 +71,7 @@ public:
|
||||
|
||||
typedef std::pair<VIEW_ITEM*, int> LAYER_ITEM_PAIR;
|
||||
|
||||
/**
|
||||
* @param aIsDynamic decides whether we are creating a static or a dynamic VIEW.
|
||||
*/
|
||||
VIEW( bool aIsDynamic = true );
|
||||
|
||||
VIEW();
|
||||
virtual ~VIEW();
|
||||
|
||||
/**
|
||||
@ -604,15 +600,6 @@ public:
|
||||
*/
|
||||
void RecacheAllItems();
|
||||
|
||||
/**
|
||||
* Tell if the VIEW is dynamic (ie. can be changed, for example displaying PCBs in a window)
|
||||
* or static (that cannot be modified, eg. displaying image/PDF).
|
||||
*/
|
||||
bool IsDynamic() const
|
||||
{
|
||||
return m_dynamic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if any of the VIEW layers needs to be refreshened.
|
||||
*
|
||||
@ -899,10 +886,6 @@ protected:
|
||||
///< Interface to #PAINTER that is used to draw items.
|
||||
GAL* m_gal;
|
||||
|
||||
///< Dynamic VIEW (eg. display PCB in window) allows changes once it is built,
|
||||
///< static (eg. image/PDF) - does not.
|
||||
bool m_dynamic;
|
||||
|
||||
///< Flag to mark targets as dirty so they have to be redrawn on the next refresh event.
|
||||
bool m_dirtyTargets[TARGETS_NUMBER];
|
||||
|
||||
|
@ -47,7 +47,7 @@ PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindo
|
||||
KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) :
|
||||
EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalType )
|
||||
{
|
||||
m_view = new KIGFX::VIEW( true );
|
||||
m_view = new KIGFX::VIEW();
|
||||
m_view->SetGAL( m_gal );
|
||||
|
||||
GetGAL()->SetWorldUnitLength( 1.0/drawSheetIUScale.IU_PER_MM /* 10 nm */ / 25.4 /* 1 inch in mm */ );
|
||||
|
@ -222,7 +222,7 @@ PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
|
||||
KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) :
|
||||
EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalType )
|
||||
{
|
||||
m_view = new KIGFX::PCB_VIEW( true );
|
||||
m_view = new KIGFX::PCB_VIEW();
|
||||
m_view->SetGAL( m_gal );
|
||||
|
||||
FRAME_T frameType = FRAME_FOOTPRINT_PREVIEW;
|
||||
|
@ -33,8 +33,8 @@ using namespace std::placeholders;
|
||||
#include <footprint.h>
|
||||
|
||||
namespace KIGFX {
|
||||
PCB_VIEW::PCB_VIEW( bool aIsDynamic ) :
|
||||
VIEW( aIsDynamic )
|
||||
PCB_VIEW::PCB_VIEW() :
|
||||
VIEW()
|
||||
{
|
||||
// Set m_boundary to define the max area size. The default value is acceptable for Pcbnew
|
||||
// and Gerbview.
|
||||
|
@ -36,7 +36,7 @@ namespace KIGFX {
|
||||
class PCB_VIEW : public VIEW
|
||||
{
|
||||
public:
|
||||
PCB_VIEW( bool aIsDynamic = true );
|
||||
PCB_VIEW();
|
||||
virtual ~PCB_VIEW();
|
||||
|
||||
/// @copydoc VIEW::Add()
|
||||
|
Loading…
Reference in New Issue
Block a user