本文整理汇总了C++中PCB_EDIT_FRAME::GetBoardFromUndoList方法的典型用法代码示例。如果您正苦于以下问题:C++ PCB_EDIT_FRAME::GetBoardFromUndoList方法的具体用法?C++ PCB_EDIT_FRAME::GetBoardFromUndoList怎么用?C++ PCB_EDIT_FRAME::GetBoardFromUndoList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PCB_EDIT_FRAME
的用法示例。
在下文中一共展示了PCB_EDIT_FRAME::GetBoardFromUndoList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSelectionChange
//.........这里部分代码省略.........
}
else
{
controls->ShowCursor( false );
controls->SetSnapping( false );
controls->ForceCursorPosition( false );
}
}
m_dragPoint = point;
}
else if( evt->IsDblClick( BUT_LEFT ) )
{
breakOutline( controls->GetCursorPosition() );
}
else if( evt->IsDrag( BUT_LEFT ) && m_dragPoint )
{
if( !modified )
{
// Save items, so changes can be undone
editFrame->OnModify();
editFrame->SaveCopyInUndoList( selection.items, UR_CHANGED );
controls->ForceCursorPosition( false );
m_original = *m_dragPoint; // Save the original position
controls->SetAutoPan( true );
modified = true;
}
bool enableAltConstraint = !!evt->Modifier( MD_CTRL );
if( enableAltConstraint != (bool) m_altConstraint ) // alternative constraint
setAltConstraint( enableAltConstraint );
m_dragPoint->SetPosition( controls->GetCursorPosition() );
if( m_altConstraint )
m_altConstraint->Apply();
else
m_dragPoint->ApplyConstraint();
updateItem();
updatePoints();
m_editPoints->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
}
else if( evt->IsAction( &COMMON_ACTIONS::pointEditorUpdate ) )
{
updatePoints();
}
else if( evt->IsMouseUp( BUT_LEFT ) )
{
controls->SetAutoPan( false );
setAltConstraint( false );
modified = false;
}
else if( evt->IsCancel() )
{
if( modified ) // Restore the last change
{
wxCommandEvent dummy;
editFrame->GetBoardFromUndoList( dummy );
updatePoints();
modified = false;
}
// Let the selection tool receive the event too
m_toolMgr->PassEvent();
break;
}
else
{
m_toolMgr->PassEvent();
}
}
if( m_editPoints )
{
finishItem();
item->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY );
view->Remove( m_editPoints.get() );
m_editPoints.reset();
}
controls->ShowCursor( false );
controls->SetAutoPan( false );
controls->SetSnapping( false );
controls->ForceCursorPosition( false );
}
setTransitions();
return 0;
}