@@ -1081,7 +1081,9 @@ void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate )
|
||||
if( it == m_layers.end() )
|
||||
continue;
|
||||
|
||||
m_gal->SetLayerDepth( it->second.renderingOrder );
|
||||
if( m_gal )
|
||||
m_gal->SetLayerDepth( it->second.renderingOrder );
|
||||
|
||||
draw( aItem, layer, aImmediate );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -714,6 +714,6 @@ void DIALOG_FIELD_PROPERTIES::UpdateField( SCH_COMMIT* aCommit, SCH_FIELD* aFiel
|
||||
parent->SetFieldsAutoplaced( AUTOPLACE_NONE );
|
||||
|
||||
// Update the hierarchy navigator labels if needed.
|
||||
if( needUpdateHierNav )
|
||||
if( editFrame && needUpdateHierNav )
|
||||
editFrame->UpdateLabelsHierarchyNavigator();
|
||||
}
|
||||
|
||||
@@ -45,13 +45,17 @@ PCB_PICKER_TOOL::PCB_PICKER_TOOL() :
|
||||
bool PCB_PICKER_TOOL::Init()
|
||||
{
|
||||
PCB_BASE_FRAME* frame = getEditFrame<PCB_BASE_FRAME>();
|
||||
MAGNETIC_SETTINGS& magneticSettings = *frame->GetMagneticItemsSettings();
|
||||
MAGNETIC_SETTINGS magneticSettings;
|
||||
CONDITIONAL_MENU& menu = m_menu->GetMenu();
|
||||
|
||||
const auto snapIsSetToAllLayers = [&]( const SELECTION& aSel )
|
||||
{
|
||||
return magneticSettings.allLayers;
|
||||
};
|
||||
if( frame )
|
||||
magneticSettings = *frame->GetMagneticItemsSettings();
|
||||
|
||||
const auto snapIsSetToAllLayers =
|
||||
[&]( const SELECTION& aSel )
|
||||
{
|
||||
return magneticSettings.allLayers;
|
||||
};
|
||||
|
||||
// "Cancel" goes at the top of the context menu when a tool is active
|
||||
menu.AddItem( ACTIONS::cancelInteractive, SELECTION_CONDITIONS::ShowAlways, 1 );
|
||||
|
||||
Reference in New Issue
Block a user