sch groups: don't allow drag selecting table cells in un-entered group

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20834
This commit is contained in:
Mike Williams
2025-05-05 10:35:47 -04:00
parent e8a9335c44
commit 2e8367a40a
+4 -1
View File
@@ -668,7 +668,10 @@ int SCH_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
{
m_toolMgr->RunAction( SCH_ACTIONS::move );
}
else if( CollectHits( collector, evt->DragOrigin(), { SCH_TABLECELL_T } ) )
// Allow drag selecting table cells, except when they're inside a group that we haven't entered
else if( CollectHits( collector, evt->DragOrigin(), { SCH_TABLECELL_T } )
&& ( collector[0]->GetParent()->GetParentGroup() == nullptr
|| collector[0]->GetParent()->GetParentGroup() == m_enteredGroup ) )
{
selectTableCells( static_cast<SCH_TABLE*>( collector[0]->GetParent() ) );
}