Fix selection tool behavior in footprint viewer
The footprint viewer isn't an edit frame, so we need to access the settings through the base frame type instead. Also, double click makes no sense in the footprint viewer, and just leads to weird results sometimes. Fixes Sentry KICAD-7A2
This commit is contained in:
parent
3178bbfba0
commit
7ea1568802
|
@ -354,6 +354,13 @@ int PCB_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
m_disambiguateTimer.Stop();
|
||||
|
||||
// Double clicks make no sense in the footprint viewer
|
||||
if( frame && frame->IsType( FRAME_FOOTPRINT_VIEWER ) )
|
||||
{
|
||||
evt->SetPassEvent();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Double click? Display the properties window
|
||||
m_frame->FocusOnItem( nullptr );
|
||||
|
||||
|
|
|
@ -232,7 +232,12 @@ protected:
|
|||
return getViewControls();
|
||||
}
|
||||
|
||||
PCB_BASE_EDIT_FRAME* frame() const
|
||||
PCB_BASE_FRAME* frame() const
|
||||
{
|
||||
return getEditFrame<PCB_BASE_FRAME>();
|
||||
}
|
||||
|
||||
PCB_BASE_EDIT_FRAME* editFrame() const
|
||||
{
|
||||
return getEditFrame<PCB_BASE_EDIT_FRAME>();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue