You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "CommandMoveNode.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CCommandMoveNode::CCommandMoveNode(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CCommandMoveNode::~CCommandMoveNode(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CString CCommandMoveNode::GetStr()
|
|
|
|
|
{
|
|
|
|
|
CString str = "_moveNode <20>ƶ<EFBFBD><C6B6>ڵ<EFBFBD>";
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
void CCommandMoveNode::SetPar(int idx,Dbxy OldPt,Dbxy NewPt)
|
|
|
|
|
{
|
|
|
|
|
m_NodeIdx = idx;//<2F><><EFBFBD><EFBFBD>node <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
m_OldPt = OldPt;//<2F>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
m_NewPt = NewPt;//<2F>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
void CCommandMoveNode::ExcuteExt()
|
|
|
|
|
{
|
|
|
|
|
SetNode(true);
|
|
|
|
|
}
|
|
|
|
|
void CCommandMoveNode::UndoExt()
|
|
|
|
|
{
|
|
|
|
|
SetNode(false);
|
|
|
|
|
}
|
|
|
|
|
void CCommandMoveNode::SetNode(bool bExcute)
|
|
|
|
|
{
|
|
|
|
|
CObjBase *pBase = m_ObjContainer.GetCurOpObj();
|
|
|
|
|
if(pBase)
|
|
|
|
|
{
|
|
|
|
|
if(bExcute)
|
|
|
|
|
{
|
|
|
|
|
pBase->SetNodePtByIdx(m_NodeIdx,m_NewPt);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pBase->SetNodePtByIdx(m_NodeIdx,m_OldPt);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|