From 2777182a2c0dcfbcad335dde1634c275df3675d4 Mon Sep 17 00:00:00 2001 From: Chris Pavlina Date: Fri, 18 Mar 2016 06:28:11 -0400 Subject: [PATCH] pcbnew: fix Duplicate assertion Do not assert that the item to be duplicated can be duplicated, just don't duplicate it. The user can trigger a Duplicate on items that aren't duplicatable, like field texts - he'll figure out that they can't be duplicated when they aren't, no need to deliver a scary warning and risk an abort. TODO: Don't pick up the duplicated selection if none of the items in it were actually duplicated, it's misleading. --- pcbnew/class_board.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 808a15c722..eb2a78c11e 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -2708,8 +2708,7 @@ BOARD_ITEM* BOARD::DuplicateAndAddItem( const BOARD_ITEM* aItem, default: // Un-handled item for duplication - wxASSERT_MSG( false, "Duplication not supported for items of class " - + aItem->GetClass() ); + new_item = NULL; break; }