Files
envi-code/SourceCode/Code2026/tg_shs/shs_geLib/TPushAcadUndo.cpp
T

65 lines
1.8 KiB
C++
Raw Normal View History

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