mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Cleanup.
This commit is contained in:
parent
92b9997948
commit
a66aff301f
@ -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() )
|
||||
{
|
||||
|
@ -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…
x
Reference in New Issue
Block a user