From c643599414d93afcdc1e504abd036c0ded899aac Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期五, 06 六月 2025 15:43:22 +0800
Subject: [PATCH] 1. 通过双缓冲解决CJobSlotGrid控件闪烁问题
---
SourceCode/Bond/Servo/CGlass.cpp | 37 ++++++++++++++++++++++++++++++++++++-
1 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/CGlass.cpp b/SourceCode/Bond/Servo/CGlass.cpp
index e2b6259..029f39f 100644
--- a/SourceCode/Bond/Servo/CGlass.cpp
+++ b/SourceCode/Bond/Servo/CGlass.cpp
@@ -12,6 +12,11 @@
CGlass::~CGlass()
{
+
+ }
+
+ void CGlass::reset()
+ {
CPath* pPath = m_pPath;
while (pPath != nullptr) {
CPath* pTemp = pPath->getNext();
@@ -20,7 +25,7 @@
}
m_pPath = nullptr;
- if (m_pBuddy != nullptr && m_type == MaterialsType::G1) {
+ if (m_pBuddy != nullptr) {
m_pBuddy->release();
}
}
@@ -77,6 +82,20 @@
CPath* CGlass::getPath()
{
return m_pPath;
+ }
+
+ CPath* CGlass::getPathWithSiteId(unsigned int nSiteId)
+ {
+ CPath* pTemp = m_pPath;
+ while (pTemp != nullptr) {
+ if (pTemp->getSiteID() == nSiteId) {
+ return pTemp;
+ }
+
+ pTemp = pTemp->getNext();
+ }
+
+ return nullptr;
}
void CGlass::addPath(unsigned int nSiteId)
@@ -177,4 +196,20 @@
{
return m_strBuddyId;
}
+
+ void CGlass::processEnd(unsigned int nSiteId)
+ {
+ CPath* pPath = getPathWithSiteID(nSiteId);
+ if (pPath != nullptr) {
+ pPath->processEnd();
+ }
+ }
+
+ BOOL CGlass::isProcessed(unsigned int nSiteId)
+ {
+ CPath* pPath = getPathWithSiteID(nSiteId);
+ if (pPath == nullptr) return FALSE;
+
+ return pPath->isProcessEnd();
+ }
}
--
Gitblit v1.9.3