void EDA_DRAW_FRAME::SetNextGrid() { if( m_gridSelectBox ) { m_gridSelectBox->SetSelection( ( m_gridSelectBox->GetSelection() + 1 ) % m_gridSelectBox->GetCount() ); wxCommandEvent cmd( wxEVT_COMMAND_COMBOBOX_SELECTED ); // cmd.SetEventObject( this ); OnSelectGrid( cmd ); } }
void PCB_BASE_FRAME::SetPrevGrid() { EDA_DRAW_FRAME::SetPrevGrid(); if( m_gridSelectBox ) { wxCommandEvent cmd( wxEVT_CHOICE ); cmd.SetEventObject( this ); OnSelectGrid( cmd ); } else GetCanvas()->Refresh(); }
void EDA_DRAW_FRAME::SetPrevGrid() { if( m_gridSelectBox ) { int cnt = m_gridSelectBox->GetSelection(); if( --cnt < 0 ) cnt = m_gridSelectBox->GetCount() - 1; m_gridSelectBox->SetSelection( cnt ); wxCommandEvent cmd( wxEVT_COMMAND_COMBOBOX_SELECTED ); // cmd.SetEventObject( this ); OnSelectGrid( cmd ); } }
void PCB_BASE_FRAME::SetFastGrid2() { if( m_FastGrid2 >= (int)GetScreen()->GetGridCount() ) return; int cmdId = GetScreen()->GetGrids()[m_FastGrid2].m_CmdId; SetPresetGrid( cmdId - ID_POPUP_GRID_LEVEL_1000 ); if( m_gridSelectBox ) { wxCommandEvent cmd( wxEVT_CHOICE ); cmd.SetEventObject( this ); OnSelectGrid( cmd ); } else GetCanvas()->Refresh(); }