修复关闭时候的错误

This commit is contained in:
2026-07-23 09:35:29 +08:00
parent c3e96d2f86
commit d1aac0e679
10 changed files with 207 additions and 71 deletions
+2 -3
View File
@@ -4,7 +4,7 @@
namespace YSG {
void HoverInfoRenderState::drawHover(QPainter* painter, AbsAxis* h, AbsAxis* v) {
QPoint pos = QCursor::pos() - h->mPlot->mapToGlobal(QPoint(0, 0));
QPoint pos = hoverInfoPos;
if(!renderAble) {
auto that = dynamic_cast<RenderState*>(this);
renderAble = dynamic_cast<HoverInfoRenderAbleInterFace*>(that->dPtr->qPtr);
@@ -26,9 +26,8 @@ namespace YSG {
}
bool HoverInfoRenderState::hoverOK(RenderAble* able) const {
QPoint pos = QCursor::pos() - able->mPlot->mapToGlobal(QPoint(0, 0));
auto tmp = dynamic_cast<HoverInfoRenderAbleInterFace*>(able);
return useHoverInfo && able->mPlot->underMouse() && tmp->hoverTest(pos);
return useHoverInfo && hoverInfoActive && tmp->hoverTest(hoverInfoPos);
}
QVector<QString> HoverInfoRenderAbleInterFace::createHoverString(AbsAxis* h, AbsAxis* v, QPoint pos) {