mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Make sure Paste can't leak through modal dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18912
This commit is contained in:
parent
6de2b5115f
commit
f1ff75f969
@ -1019,6 +1019,25 @@ int PCB_CONTROL::Paste( const TOOL_EVENT& aEvent )
|
||||
if( isFootprintEditor && ( !board() || !footprint() ) )
|
||||
return 0;
|
||||
|
||||
// We should never get here if a modal dialog is up... but we do.
|
||||
// https://gitlab.com/kicad/code/kicad/-/issues/18912
|
||||
#ifdef __WXMAC__
|
||||
if( wxDialog::OSXHasModalDialogsOpen() )
|
||||
{
|
||||
wxBell();
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
for( wxWindow* window : frame()->GetChildren() )
|
||||
{
|
||||
if( dynamic_cast<wxRichMessageDialog*>( window ) )
|
||||
{
|
||||
wxBell();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
BOARD_COMMIT commit( frame() );
|
||||
|
||||
CLIPBOARD_IO pi;
|
||||
|
Loading…
x
Reference in New Issue
Block a user