From ecc5fc98948eb07ec9c84719391fda4dd02493e3 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 10 Jul 2019 01:38:02 +0100 Subject: [PATCH] Cleanup. --- pcbnew/github/github_plugin.cpp | 15 ++--------- pcbnew/legacy_plugin.cpp | 47 ++++++--------------------------- pcbnew/tools/edit_tool.h | 2 +- 3 files changed, 11 insertions(+), 53 deletions(-) diff --git a/pcbnew/github/github_plugin.cpp b/pcbnew/github/github_plugin.cpp index d450895b71..84438cf854 100644 --- a/pcbnew/github/github_plugin.cpp +++ b/pcbnew/github/github_plugin.cpp @@ -325,13 +325,7 @@ void GITHUB_PLUGIN::FootprintLibCreate( const wxString& aLibraryPath, const PROP cacheLib( aLibraryPath, aProperties ); if( m_pretty_dir.size() ) - { PCB_IO::FootprintLibCreate( m_pretty_dir, aProperties ); - } - else - { - // THROW_IO_ERROR() @todo - } } @@ -341,14 +335,9 @@ bool GITHUB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, const PROP cacheLib( aLibraryPath, aProperties ); if( m_pretty_dir.size() ) - { return PCB_IO::FootprintLibDelete( m_pretty_dir, aProperties ); - } - else - { - // THROW_IO_ERROR() @todo - return false; - } + + return false; } diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index cee7d97623..3d0f95da0b 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -1120,24 +1120,21 @@ void LEGACY_PLUGIN::loadSETUP() m_board->SetZoneSettings( zs ); // Very old *.brd file does not have NETCLASSes - // "TrackWidth", "ViaSize", "ViaDrill", "ViaMinSize", - // and "TrackClearence", were defined in SETUP - // these values are put into the default NETCLASS until later board load - // code should override them. *.brd files which have been - // saved with knowledge of NETCLASSes will override these - // defaults, very old boards (before 2009) will not and use the setup values. + // "TrackWidth", "ViaSize", "ViaDrill", "ViaMinSize", and "TrackClearence" were + // defined in SETUP; these values are put into the default NETCLASS until later board + // load code should override them. *.brd files which have been saved with knowledge + // of NETCLASSes will override these defaults, very old boards (before 2009) will not + // and use the setup values. // However these values should be the same as default NETCLASS. return; // preferred exit } } - // @todo: this code is currently unreachable, would need a goto, to get here. - // that may be better handled with an #ifdef - - /* Ensure tracks and vias sizes lists are ok: + /* + * Ensure tracks and vias sizes lists are ok: * Sort lists by by increasing value and remove duplicates - * (the first value is not tested, because it is the netclass value + * (the first value is not tested, because it is the netclass value) */ BOARD_DESIGN_SETTINGS& designSettings = m_board->GetDesignSettings(); sort( designSettings.m_ViasDimensionsList.begin() + 1, designSettings.m_ViasDimensionsList.end() ); @@ -1743,15 +1740,6 @@ void LEGACY_PLUGIN::loadMODULE_EDGE( MODULE* aModule ) break; } - // Check for a reasonable width: - - /* @todo no MAX_WIDTH in out of reach header. - if( width <= 1 ) - width = 1; - else if( width > MAX_WIDTH ) - width = MAX_WIDTH; - */ - // Check for a reasonable layer: // m_Layer must be >= FIRST_NON_COPPER_LAYER, but because microwave footprints // can use the copper layers m_Layer < FIRST_NON_COPPER_LAYER is allowed. @@ -1834,7 +1822,6 @@ void LEGACY_PLUGIN::loadMODULE_TEXT( TEXTE_MODULE* aText ) aText->SetTextAngle( orient ); - // @todo put in accessors? // Set a reasonable width: if( thickn < 1 ) thickn = 1; @@ -2163,26 +2150,8 @@ void LEGACY_PLUGIN::loadPCB_TEXT() BIU thickn = biuParse( data, &data ); double angle = degParse( data ); - // Ensure the text has minimal size to see this text on screen: - - /* @todo wait until we are firmly in the nanometer world - if( sz.x < 5 ) - sz.x = 5; - - if( sz.y < 5 ) - sz.y = 5; - */ - pcbtxt->SetTextSize( size ); - /* @todo move into an accessor - // Set a reasonable width: - if( thickn < 1 ) - thickn = 1; - - thickn = Clamp_Text_PenSize( thickn, size ); - */ - pcbtxt->SetThickness( thickn ); pcbtxt->SetTextAngle( angle ); diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 4719e4d10a..a2ffd7cf6d 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -84,7 +84,7 @@ public: /** * Function Drag() * - * todo + * Invoke the PNS router to drag tracks. */ int Drag( const TOOL_EVENT& aEvent );