Commit c5e1c249 authored by Roman Bashkov's avatar Roman Bashkov Committed by Andrey Fedorushkov
Browse files

pcbnew:

* Add hotkey fast switch to two grids: for place and trace
	Alt+"1" - switch grid for place module
	Alt+"2" - switch grid for trace
  This two grid set in dialog - menu Preferences->Dimensions->Grid.
* Add hotkey switch grid:
	"`" - switch to next grid
	Ctrl+"`" - switch to previous grid
* Add hotkey switch track width:
	"W" - switch to next track width
	Ctrl+"W" - switch to previous track width
cmakemodules:
* Add GOST to KICAD_BUILD_VERSION if define KICAD_GOST.
parent ddedd1ff
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -56,7 +56,11 @@ macro( create_bzr_version_header )
    if( Kicad_REPO_LAST_CHANGED_DATE )
        string( REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+)" "\\1-\\2-\\3"
                _kicad_bzr_date ${Kicad_REPO_LAST_CHANGED_DATE} )
        if( KICAD_GOST )
        	set( KICAD_BUILD_VERSION "(${_kicad_bzr_date} BZR ${Kicad_REPO_REVISION} GOST)" )
        else( KICAD_GOST )
        	set( KICAD_BUILD_VERSION "(${_kicad_bzr_date} BZR ${Kicad_REPO_REVISION})" )
        endif( KICAD_GOST )

        # Definition to conditionally use date and revision returned from the
        # Bazaar log command instead of hand coded date and revision in
+1 −1
Original line number Diff line number Diff line
@@ -346,8 +346,8 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
     * index returned by GetSelection().
     */
    m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000;
    screen->SetCrossHairPosition( DrawPanel->GetScreenCenterLogicalPosition() );
    screen->SetGrid( id );
    screen->SetCrossHairPosition( screen->RefPos( true ) );
    Refresh();
}

+3 −0
Original line number Diff line number Diff line
@@ -60,6 +60,9 @@ public:
    EDA_UNITS_T             m_UserGridUnit;
    wxRealPoint             m_UserGridSize;

    int                     m_FastGrid1;
    int                     m_FastGrid2;

    EDA_3D_FRAME*           m_Draw3DFrame;
    FOOTPRINT_EDIT_FRAME*   m_ModuleEditFrame;

+12 −0
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ static const wxString DisplayViaFillEntry( wxT( "DiViaFi" ) );
static const wxString DisplayPadNumberEntry( wxT( "DiPadNu" ) );
static const wxString DisplayModuleEdgeEntry( wxT( "DiModEd" ) );
static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) );
static const wxString FastGrid1Entry( wxT( "FastGrid1" ) );
static const wxString FastGrid2Entry( wxT( "FastGrid2" ) );


/****************************/
@@ -76,6 +78,9 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* father,
    m_UserGridSize        = wxRealPoint( 100.0, 100.0 );
    m_UserGridUnit        = INCHES;
    m_Collector           = new GENERAL_COLLECTOR();

    m_FastGrid1           = 0;
    m_FastGrid2           = 0;
}


@@ -482,6 +487,11 @@ void PCB_BASE_FRAME::LoadSettings()
    cfg->Read( m_FrameName + DisplayPadNumberEntry, &m_DisplayPadNum, true );
    cfg->Read( m_FrameName + DisplayModuleEdgeEntry, &m_DisplayModEdge, ( long )FILLED );

    cfg->Read( m_FrameName + FastGrid1Entry, &itmp, ( long )0);
    m_FastGrid1 = itmp;
    cfg->Read( m_FrameName + FastGrid2Entry, &itmp, ( long )0);
    m_FastGrid2 = itmp;

    if( m_DisplayModEdge < FILAIRE || m_DisplayModEdge > SKETCH )
        m_DisplayModEdge = FILLED;

@@ -518,6 +528,8 @@ void PCB_BASE_FRAME::SaveSettings()
    cfg->Write( m_FrameName + DisplayPadNumberEntry, m_DisplayPadNum );
    cfg->Write( m_FrameName + DisplayModuleEdgeEntry, ( long )m_DisplayModEdge );
    cfg->Write( m_FrameName + DisplayModuleTextEntry, ( long )m_DisplayModText );
    cfg->Write( m_FrameName + FastGrid1Entry, ( long )m_FastGrid1 );
    cfg->Write( m_FrameName + FastGrid2Entry, ( long )m_FastGrid2 );
}


Loading