修复关闭时候的错误
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user