From 1e9a2cecb33f1d2bb71c4acdf1afd59b20eb53c1 Mon Sep 17 00:00:00 2001 From: mzn Date: Wed, 11 Apr 2007 11:37:47 +0000 Subject: [PATCH] Minor corrections concerning hilight. --- src/QxGraph/QxGraph_CanvasView.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/QxGraph/QxGraph_CanvasView.cxx b/src/QxGraph/QxGraph_CanvasView.cxx index d668123de..dbcf62a54 100644 --- a/src/QxGraph/QxGraph_CanvasView.cxx +++ b/src/QxGraph/QxGraph_CanvasView.cxx @@ -294,12 +294,14 @@ void QxGraph_CanvasView::contentsMouseMoveEvent(QMouseEvent* theEvent) for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) { QxGraph_ActiveItem* anActItem = dynamic_cast( *it ); - if (!isHilightPerformed && anActItem && anActItem != myHilightedItem) { + if (!isHilightPerformed && anActItem) { // hilight anActItem->hilight(aPoint); - if (myHilightedItem) - myHilightedItem->hilight(aPoint, false); - myHilightedItem = anActItem; + if (anActItem != myHilightedItem) { + if (myHilightedItem) + myHilightedItem->hilight(aPoint, false); + myHilightedItem = anActItem; + } isHilightPerformed = true; // show tooltip @@ -597,6 +599,7 @@ void QxGraph_ToolTip::maybeTip(const QPoint& theMousePos) { QRect aTipRect(avX, avY, (int)(aRect.width()*aWM.m11()), (int)(aRect.height()*aWM.m22())); if (!aText.isEmpty()) tip(aTipRect, aText); + return; } } } -- 2.39.2