Browse Source

Cleanup.

(cherry picked from commit a66aff301f)
9.0
Jeff Young 5 months ago
parent
commit
31af54d978
  1. 8
      pagelayout_editor/tools/pl_edit_tool.cpp
  2. 13
      pcbnew/tools/board_inspection_tool.cpp

8
pagelayout_editor/tools/pl_edit_tool.cpp

@ -544,7 +544,6 @@ int PL_EDIT_TOOL::Paste( const TOOL_EVENT& aEvent )
{
PL_SELECTION& selection = m_selectionTool->GetSelection();
DS_DATA_MODEL& model = DS_DATA_MODEL::GetTheInstance();
bool createdAnything = false;
if( std::unique_ptr<wxImage> clipImg = GetImageFromClipboard() )
{
@ -552,8 +551,6 @@ int PL_EDIT_TOOL::Paste( const TOOL_EVENT& aEvent )
image->SetImage( *clipImg );
auto dataItem = std::make_unique<DS_DATA_ITEM_BITMAP>( image.release() );
model.Append( dataItem.release() );
createdAnything = true;
}
else
{
@ -561,13 +558,8 @@ int PL_EDIT_TOOL::Paste( const TOOL_EVENT& aEvent )
const std::string clipText = GetClipboardUTF8();
model.SetPageLayout( clipText.c_str(), true, wxT( "clipboard" ) );
createdAnything = true;
}
// Nothing pasteable
if( !createdAnything )
return 0;
// Build out draw items and select the first of each data item
for( DS_DATA_ITEM* dataItem : model.GetItems() )
{

13
pcbnew/tools/board_inspection_tool.cpp

@ -1120,17 +1120,8 @@ int BOARD_INSPECTION_TOOL::InspectClearance( const TOOL_EVENT& aEvent )
if( layer >= 0 )
{
if( !pageAdded )
{
r = dialog->AddHTMLPage( _( "Hole" ) );
pageAdded = true;
}
else
{
r->Report( "" );
r->Report( "" );
r->Report( "" );
}
r = dialog->AddHTMLPage( _( "Hole" ) );
pageAdded = true;
reportHeader( _( "Hole clearance resolution for:" ), a, b, layer, r );

Loading…
Cancel
Save