Files
envi-code/SourceCode/Code2026/tg_shs/shs_geLib/TPushAcadUndo.cpp
T
2026-09-28 15:28:50 +08:00

66 lines
1.7 KiB
C++

//-----------------------------------------------------------------------------+
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
// = FileName : TPushAcadUndo.cpp
// = Version : ver2.0
// = Author : xlc
// = CreateDate : 2002-09-09
// = Description: 类的定义
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#include "StdAfx.h"
#include "TPushAcadUndo.h"
#include "TchGlobalFunc.h"
TPushAcadUndo::TPushAcadUndo()
{
TGGetVar(_T("UNDOCTL"), &m_nUndoCtl);
if (m_nUndoCtl & 0x02) // Undo单步执行
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("control"), RTSTR, _T("all"), RTNONE);
SHads_command(RTSTR, _T("undo"), RTSTR, _T("auto"), RTSTR, _T("off"), RTNONE);
}
if (!(m_nUndoCtl & 0x01)) // Undo不可用
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("all"), RTNONE);
SHads_command(RTSTR, _T("undo"), RTSTR, _T("auto"), RTSTR, _T("off"), RTNONE);
}
if (!(m_nUndoCtl & 0x08))
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("BE"), RTNONE);
}
if (m_nUndoCtl & 0x04)
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("auto"), RTSTR, _T("off"), RTNONE);
}
}
TPushAcadUndo::~TPushAcadUndo()
{
//modify by xlc on 091106 解决2010平台显示无效关键字的问题
SHads_command(RTSTR,_T("redraw"),RTNONE);
if (!(m_nUndoCtl & 0x01))
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("control"), RTSTR, _T("none"), RTNONE);
}
if (m_nUndoCtl & 0x02)
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("control"), RTSTR, _T("one"), RTNONE);
}
if (!(m_nUndoCtl & 0x08)) // 无活动编组
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("E"), RTNONE);
}
if (m_nUndoCtl & 0x04)
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("auto"), RTSTR, _T("on"), RTNONE);
}
}