Clean up some TODOs.

This commit is contained in:
Jeff Young 2021-12-02 22:25:35 +00:00
parent da11574a19
commit ed79f6e511
9 changed files with 17 additions and 32 deletions

View File

@ -26,7 +26,6 @@
#include <executable_names.h>
// TODO Executable names TODO
#ifdef __WINDOWS__
const wxString CVPCB_EXE ( "cvpcb.exe" );
const wxString PCBNEW_EXE ( "pcbnew.exe" );

View File

@ -38,9 +38,6 @@
- DRCE_MALFORMED_COURTYARD
- DRCE_PTH_IN_COURTYARD,
- DRCE_NPTH_IN_COURTYARD,
TODO: do an actual clearance check instead of polygon intersection. Treat closed outlines
as filled and allow open curves in the courtyard.
*/
class DRC_TEST_PROVIDER_COURTYARD_CLEARANCE : public DRC_TEST_PROVIDER_CLEARANCE_BASE

View File

@ -39,8 +39,6 @@
Generated errors:
- DRCE_DRILLED_HOLES_TOO_CLOSE
- DRCE_DRILLED_HOLES_COLOCATED
TODO: vias-in-smd-pads check
*/
class DRC_TEST_PROVIDER_HOLE_TO_HOLE : public DRC_TEST_PROVIDER_CLEARANCE_BASE

View File

@ -295,8 +295,6 @@ public:
// @copydoc BOARD_ITEM::GetEffectiveShape
virtual std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER ) const override;
//TODO(snh): Add GetSelectMenuText() and GetMsgPanelInfoBase()
/**
* Function GetLength
* returns the length of the arc track

View File

@ -302,7 +302,6 @@ int KIGFX::PCB_PRINT_PAINTER::getDrillShape( const PAD* aPad ) const
VECTOR2D KIGFX::PCB_PRINT_PAINTER::getDrillSize( const PAD* aPad ) const
{
// TODO should it depend on the pad size?
return m_drillMarkReal ? KIGFX::PCB_PAINTER::getDrillSize( aPad ) :
VECTOR2D( m_drillMarkSize, m_drillMarkSize );
}
@ -310,6 +309,5 @@ VECTOR2D KIGFX::PCB_PRINT_PAINTER::getDrillSize( const PAD* aPad ) const
int KIGFX::PCB_PRINT_PAINTER::getDrillSize( const PCB_VIA* aVia ) const
{
// TODO should it depend on the via size?
return m_drillMarkReal ? KIGFX::PCB_PAINTER::getDrillSize( aVia ) : m_drillMarkSize;
}

View File

@ -33,6 +33,9 @@
#include <layer_ids.h>
#include <geometry/convex_hull.h>
#include <confirm.h>
#include <tools/pcb_tool_base.h>
#include <tool/tool_manager.h>
#include <settings/app_settings.h>
#include <pcb_painter.h>
@ -1046,7 +1049,6 @@ bool PNS_KICAD_IFACE_BASE::syncZone( PNS::NODE* aWorld, ZONE* aZone, SHAPE_POLY_
return false;
LSET layers = aZone->GetLayerSet();
EDA_UNITS units = EDA_UNITS::MILLIMETRES; // TODO: get real units
poly = aZone->Outline();
poly->CacheTriangulation( false );
@ -1054,7 +1056,7 @@ bool PNS_KICAD_IFACE_BASE::syncZone( PNS::NODE* aWorld, ZONE* aZone, SHAPE_POLY_
if( !poly->IsTriangulationUpToDate() )
{
KIDIALOG dlg( nullptr, wxString::Format( _( "%s is malformed." ),
aZone->GetSelectMenuText( units ) ),
aZone->GetSelectMenuText( GetUnits() ) ),
KIDIALOG::KD_WARNING );
dlg.ShowDetailedText( wxString::Format( _( "This zone cannot be handled by the router.\n"
"Please verify it is not a self-intersecting "
@ -1672,6 +1674,12 @@ void PNS_KICAD_IFACE::Commit()
}
EDA_UNITS PNS_KICAD_IFACE::GetUnits() const
{
return static_cast<EDA_UNITS>( m_tool->GetManager()->GetSettings()->m_System.units );
}
void PNS_KICAD_IFACE::SetView( KIGFX::VIEW* aView )
{
wxLogTrace( "PNS", "SetView %p", aView );
@ -1704,7 +1712,6 @@ void PNS_KICAD_IFACE::SetView( KIGFX::VIEW* aView )
void PNS_KICAD_IFACE::UpdateNet( int aNetCode )
{
wxLogTrace( "PNS", "Update-net %d", aNetCode );
}

View File

@ -74,15 +74,11 @@ public:
void SetStartLayer( int aLayer ) { m_startLayer = aLayer; }
virtual PNS::NODE* GetWorld() const override
{
return m_world;
};
virtual PNS::NODE* GetWorld() const override { return m_world; };
BOARD* GetBoard() const
{
return m_board;
}
BOARD* GetBoard() const { return m_board; }
virtual EDA_UNITS GetUnits() const { return EDA_UNITS::MILLIMETRES; };
PNS::RULE_RESOLVER* GetRuleResolver() override;
PNS::DEBUG_DECORATOR* GetDebugDecorator() override;
@ -130,6 +126,7 @@ public:
void UpdateNet( int aNetCode ) override;
EDA_UNITS GetUnits() const override;
private:
struct OFFSET

View File

@ -611,8 +611,6 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
else
{
PCB_TEXT* pcbText = new PCB_TEXT( m_frame->GetModel() );
// TODO we have to set IS_NEW, otherwise InstallTextPCB.. creates an
// undo entry :| LEGACY_CLEANUP
pcbText->SetFlags( IS_NEW );
pcbText->SetLayer( layer );

View File

@ -626,15 +626,8 @@ void ZONE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
PCB_LAYER_ID layer = m_layer;
// NOTE: This brings in dependence on PCB_EDIT_FRAME to the qa tests, which isn't ideal.
// TODO: Figure out a way for items to know the active layer without the whole edit frame?
#if 0
if( PCB_EDIT_FRAME* pcbframe = dynamic_cast<PCB_EDIT_FRAME*>( aFrame ) )
{
if( m_FilledPolysList.count( pcbframe->GetActiveLayer() ) )
layer = pcbframe->GetActiveLayer();
}
#endif
if( dynamic_cast<PCB_SCREEN*>( aFrame->GetScreen() ) )
layer = dynamic_cast<PCB_SCREEN*>( aFrame->GetScreen() )->m_Active_Layer;
if( !GetIsRuleArea() )
{