diff --git a/common/gal/opengl/antialiasing.h b/common/gal/opengl/antialiasing.h index 2993dd4fba..e99186f29f 100644 --- a/common/gal/opengl/antialiasing.h +++ b/common/gal/opengl/antialiasing.h @@ -122,8 +122,7 @@ namespace KIGFX { void loadShaders(); void updateUniforms(); - bool areBuffersInitialized; // - bool isInitialized; // shaders linked + bool areBuffersInitialized; unsigned int smaaBaseBuffer; // base + overlay temporary unsigned int smaaEdgesBuffer; diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index 56584c9d12..cb11c6189e 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -41,10 +41,8 @@ using namespace KIGFX; VIEW_GROUP::VIEW_GROUP( VIEW* aView ) : - m_layer( ITEM_GAL_LAYER( GP_OVERLAY ) ), - m_view( aView ) + m_layer( ITEM_GAL_LAYER( GP_OVERLAY ) ) { - } @@ -140,11 +138,8 @@ void VIEW_GROUP::ViewGetLayers( int aLayers[], int& aCount ) const void VIEW_GROUP::FreeItems() { - for(unsigned int i = 0 ; i < GetSize(); i++) - { - VIEW_ITEM* item = GetItem(i); - delete item; - } + for( unsigned int i = 0 ; i < GetSize(); i++ ) + delete GetItem( i ); Clear(); } diff --git a/include/view/view_group.h b/include/view/view_group.h index 31c2d9bedb..fb98412ee6 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -136,8 +136,6 @@ protected: private: void updateBbox(); - - VIEW* m_view; }; } // namespace KIGFX diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index bb72490b27..18e7c75537 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -194,7 +194,7 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent ) BOARD_COMMIT commit( m_frame ); // Add a VIEW_GROUP that serves as a preview for the new item - SELECTION preview( m_view ); + SELECTION preview; m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); @@ -364,7 +364,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent ) int maxThickness; // Add a VIEW_GROUP that serves as a preview for the new item - SELECTION preview( m_view ); + SELECTION preview; m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); @@ -577,7 +577,7 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT& aEvent ) VECTOR2I delta = cursorPos - list.front()->GetPosition(); // Add a VIEW_GROUP that serves as a preview for the new item - SELECTION preview( m_view ); + SELECTION preview; BOARD_COMMIT commit( m_frame ); // Build the undo list & add items to the current view @@ -799,7 +799,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic, DRAWSEGMENT line45; // Add a VIEW_GROUP that serves as a preview for the new item - SELECTION preview( m_view ); + SELECTION preview; m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); @@ -987,7 +987,7 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT*& aGraphic ) helperLine.SetWidth( 1 ); // Add a VIEW_GROUP that serves as a preview for the new item - SELECTION preview( m_view ); + SELECTION preview; m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); @@ -1166,7 +1166,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout ) BOARD_COMMIT commit( m_frame ); // Add a VIEW_GROUP that serves as a preview for the new item - SELECTION preview( m_view ); + SELECTION preview; m_view->Add( &preview ); m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index dde12c6e80..780a506aaf 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1399,11 +1399,6 @@ bool SELECTION_TOOL::SanitizeSelection() } -SELECTION::SELECTION( KIGFX::VIEW* aView ) : - KIGFX::VIEW_GROUP( aView ) -{} - - void SELECTION::clear() { m_items.clear(); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index ec2edc95ca..ad79144cfd 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -55,8 +55,6 @@ public: using ITER = std::set::iterator; using CITER = std::set::const_iterator; - SELECTION( KIGFX::VIEW* aView = nullptr ); - ITER begin() { return m_items.begin(); } ITER end() { return m_items.end(); } CITER begin() const { return m_items.cbegin(); }