fix 修正自定义设备拖拽时的效率问题

拖拽时一样走绘制缓存
This commit is contained in:
gjm committed 2026-10-25 11:29:19 +08:00
1 parent 44f53dede4
commit 2931ab875c
1 file changed
+19 -21
@@ -3030,32 +3030,30 @@ Acad::ErrorStatus AecDbEwEquipment::Draw3d(AcGiDraw &dc) const
DrawInfArrow(dc);
if (!dc.IsDragging())//解开后崩溃
if (Has3DBuffer())
{
if (Has3DBuffer())
{
AcDbEntity* pEnt = NULL;
const AcDbVoidPtrArray &ar3D = Get3DBuffer();
for (int i = 0;i < ar3D.length();i++)
AcDbEntity *pEnt = NULL;
const AcDbVoidPtrArray &ar3D = Get3DBuffer();
for (int i = 0; i < ar3D.length(); i++)
{
pEnt = (AcDbEntity *)ar3D.at(i);
if (IsActive())
{
pEnt = (AcDbEntity*)ar3D.at(i);
if ( IsActive() )
{
BackupColorIndex(pEnt);
pEnt->setColorIndex(nColor);
}
else
{
SetBackupColorIndex(pEnt);
}
dc.DrawEntity(*pEnt);
BackupColorIndex(pEnt);
pEnt->setColorIndex(nColor);
}
else
{
SetBackupColorIndex(pEnt);
}
dc.DrawEntity(*pEnt);
}
dc.SetLayer(idLay);
dc.SetColor(nCrBk);
return Acad::eOk;
}
dc.SetLayer(idLay);
dc.SetColor(nCrBk);
return Acad::eOk;
}
Draw3dSolid(&dc, nColor);
dc.SetColor(nColor);