Formatting.
This commit is contained in:
parent
8a720ef305
commit
fd77982496
|
@ -111,12 +111,11 @@ int GERBVIEW_CONTROL::ExportToPcbnew( const TOOL_EVENT& aEvent )
|
|||
return 0;
|
||||
}
|
||||
|
||||
wxString fileDialogName( wxT( "noname." ) + KiCadPcbFileExtension );
|
||||
wxString path = m_frame->GetMruPath();
|
||||
wxString fileDialogName( wxT( "noname." ) + KiCadPcbFileExtension );
|
||||
wxString path = m_frame->GetMruPath();
|
||||
|
||||
wxFileDialog filedlg( m_frame, _( "Board File Name" ),
|
||||
path, fileDialogName, PcbFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
wxFileDialog filedlg( m_frame, _( "Board File Name" ), path, fileDialogName, PcbFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
if( filedlg.ShowModal() == wxID_CANCEL )
|
||||
return 0;
|
||||
|
@ -183,6 +182,7 @@ int GERBVIEW_CONTROL::HighlightControl( const TOOL_EVENT& aEvent )
|
|||
else if( item && aEvent.IsAction( &GERBVIEW_ACTIONS::highlightAttribute ) )
|
||||
{
|
||||
D_CODE* apertDescr = item->GetDcodeDescr();
|
||||
|
||||
if( apertDescr )
|
||||
{
|
||||
auto string = apertDescr->m_AperFunction;
|
||||
|
@ -300,9 +300,8 @@ int GERBVIEW_CONTROL::ClearAllLayers( const TOOL_EVENT& aEvent )
|
|||
int GERBVIEW_CONTROL::ReloadAllLayers( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
// Store filenames
|
||||
wxArrayString listOfGerberFiles;
|
||||
std::vector<int> fileType;
|
||||
|
||||
wxArrayString listOfGerberFiles;
|
||||
std::vector<int> fileType;
|
||||
GERBER_FILE_IMAGE_LIST* list = m_frame->GetImagesList();
|
||||
|
||||
for( unsigned i = 0; i < list->ImagesMaxCount(); i++ )
|
||||
|
@ -313,7 +312,7 @@ int GERBVIEW_CONTROL::ReloadAllLayers( const TOOL_EVENT& aEvent )
|
|||
if( !list->GetGbrImage( i )->m_InUse )
|
||||
continue;
|
||||
|
||||
auto* drill_file = dynamic_cast<EXCELLON_IMAGE*>( list->GetGbrImage( i ) );
|
||||
EXCELLON_IMAGE* drill_file = dynamic_cast<EXCELLON_IMAGE*>( list->GetGbrImage( i ) );
|
||||
|
||||
if( drill_file )
|
||||
fileType.push_back( 1 );
|
||||
|
|
|
@ -173,10 +173,14 @@ int GERBVIEW_INSPECTION_TOOL::ShowSource( const TOOL_EVENT& aEvent )
|
|||
wxMessageBox( msg );
|
||||
}
|
||||
else
|
||||
{
|
||||
ExecuteFile( m_frame, editorname, QuoteFullPath( fn ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox( _( "No editor defined. Please select one" ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -71,8 +71,8 @@ private:
|
|||
( net_attr.m_NetAttribType & GBR_NETLIST_METADATA::GBR_NETINFO_CMP ) )
|
||||
{
|
||||
auto menuEntry = Add( GERBVIEW_ACTIONS::highlightComponent );
|
||||
menuEntry->SetItemLabel( wxString::Format(
|
||||
_( "Highlight Items of Component \"%s\"" ), net_attr.m_Cmpref ) );
|
||||
menuEntry->SetItemLabel( wxString::Format( _( "Highlight Items of Component \"%s\"" ),
|
||||
net_attr.m_Cmpref ) );
|
||||
addSeparator = true;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ private:
|
|||
{
|
||||
auto menuEntry = Add( GERBVIEW_ACTIONS::highlightNet );
|
||||
menuEntry->SetItemLabel( wxString::Format( _( "Highlight Items of Net \"%s\"" ),
|
||||
UnescapeString( net_attr.m_Netname ) ) );
|
||||
UnescapeString( net_attr.m_Netname ) ) );
|
||||
addSeparator = true;
|
||||
}
|
||||
|
||||
|
@ -89,8 +89,8 @@ private:
|
|||
if( apertDescr && !apertDescr->m_AperFunction.IsEmpty() )
|
||||
{
|
||||
auto menuEntry = Add( GERBVIEW_ACTIONS::highlightAttribute );
|
||||
menuEntry->SetItemLabel( wxString::Format(
|
||||
_( "Highlight Aperture Type \"%s\"" ), apertDescr->m_AperFunction ) );
|
||||
menuEntry->SetItemLabel( wxString::Format( _( "Highlight Aperture Type \"%s\"" ),
|
||||
apertDescr->m_AperFunction ) );
|
||||
addSeparator = true;
|
||||
}
|
||||
}
|
||||
|
@ -202,7 +202,6 @@ int GERBVIEW_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
selectPoint( evt->Position() );
|
||||
}
|
||||
|
||||
// right click? if there is any object - show the context menu
|
||||
else if( evt->IsClick( BUT_RIGHT ) )
|
||||
{
|
||||
|
@ -214,20 +213,19 @@ int GERBVIEW_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
|
||||
m_menu.ShowContextMenu( m_selection );
|
||||
}
|
||||
|
||||
// Middle double click? Do zoom to fit
|
||||
else if( evt->IsDblClick( BUT_MIDDLE ) )
|
||||
{
|
||||
m_toolMgr->RunAction( ACTIONS::zoomFitScreen, true );
|
||||
}
|
||||
|
||||
else if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO_PRE )
|
||||
{
|
||||
clearSelection();
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
evt->SetPassEvent();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -331,7 +329,7 @@ int GERBVIEW_SELECTION_TOOL::SelectItems( const TOOL_EVENT& aEvent )
|
|||
if( items )
|
||||
{
|
||||
// Perform individual selection of each item before processing the event.
|
||||
for( auto item : *items )
|
||||
for( EDA_ITEM* item : *items )
|
||||
select( item );
|
||||
|
||||
m_toolMgr->ProcessEvent( EVENTS::SelectedEvent );
|
||||
|
@ -365,7 +363,7 @@ int GERBVIEW_SELECTION_TOOL::UnselectItems( const TOOL_EVENT& aEvent )
|
|||
if( items )
|
||||
{
|
||||
// Perform individual unselection of each item before processing the event
|
||||
for( auto item : *items )
|
||||
for( EDA_ITEM* item : *items )
|
||||
unselect( item );
|
||||
|
||||
m_toolMgr->ProcessEvent( EVENTS::UnselectedEvent );
|
||||
|
@ -397,8 +395,8 @@ void GERBVIEW_SELECTION_TOOL::clearSelection()
|
|||
if( m_selection.Empty() )
|
||||
return;
|
||||
|
||||
for( auto item : m_selection )
|
||||
unselectVisually( static_cast<EDA_ITEM*>( item ) );
|
||||
for( EDA_ITEM* item : m_selection )
|
||||
unselectVisually( item );
|
||||
|
||||
m_selection.Clear();
|
||||
|
||||
|
|
|
@ -36,12 +36,14 @@
|
|||
class SELECTION : public KIGFX::VIEW_GROUP
|
||||
{
|
||||
public:
|
||||
SELECTION() : KIGFX::VIEW_GROUP::VIEW_GROUP()
|
||||
SELECTION() :
|
||||
KIGFX::VIEW_GROUP::VIEW_GROUP()
|
||||
{
|
||||
m_isHover = false;
|
||||
}
|
||||
|
||||
SELECTION( const SELECTION& aOther ) : KIGFX::VIEW_GROUP::VIEW_GROUP()
|
||||
SELECTION( const SELECTION& aOther ) :
|
||||
KIGFX::VIEW_GROUP::VIEW_GROUP()
|
||||
{
|
||||
m_items = aOther.m_items;
|
||||
m_isHover = aOther.m_isHover;
|
||||
|
|
Loading…
Reference in New Issue