eeschema: Cleanup processing for multiple line editing
This commit is contained in:
parent
20e7fc8a0e
commit
81292d2bf1
|
@ -1306,23 +1306,19 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
case SCH_LINE_T:
|
case SCH_LINE_T:
|
||||||
{
|
{
|
||||||
SCH_LINE* line = static_cast<SCH_LINE*>( item );
|
|
||||||
|
|
||||||
// We purposely disallow editing everything except graphic lines
|
|
||||||
if( !line->IsGraphicLine() )
|
|
||||||
break;
|
|
||||||
|
|
||||||
if( !selection.AreAllItemsIdentical() )
|
if( !selection.AreAllItemsIdentical() )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
std::deque<SCH_LINE*> lines;
|
std::deque<SCH_LINE*> lines;
|
||||||
for( auto item : selection.Items() )
|
for( auto selItem : selection.Items() )
|
||||||
{
|
{
|
||||||
auto line = dynamic_cast<SCH_LINE*>( item );
|
SCH_LINE* line = dynamic_cast<SCH_LINE*>( selItem );
|
||||||
assert( line != nullptr );
|
|
||||||
|
if( line )
|
||||||
lines.push_back( line );
|
lines.push_back( line );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Verify we are only editing graphic lines
|
||||||
if( !std::all_of( lines.begin(), lines.end(),
|
if( !std::all_of( lines.begin(), lines.end(),
|
||||||
[&]( const SCH_LINE* r ) { return r->IsGraphicLine(); } ) )
|
[&]( const SCH_LINE* r ) { return r->IsGraphicLine(); } ) )
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue