Skip to content

Commit ab79be3

Browse files
committed
Reset on hover
1 parent 25d1d2f commit ab79be3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Interface/Application/NetworkEditor.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,13 +1241,17 @@ void ErrorItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
12411241
}
12421242
}
12431243

1244+
void ErrorItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
1245+
{
1246+
timeLine_->setCurrentTime(0);
1247+
}
1248+
12441249
void ErrorItem::animate(qreal val)
12451250
{
12461251
if (val < 1)
12471252
show();
12481253
else
12491254
hide();
1250-
//scene()->removeItem(this);
12511255
setOpacity(val < 0.5 ? 1 : 2 - 2*val);
12521256
}
12531257

src/Interface/Application/NetworkEditor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ namespace Gui {
8989
int num() const { return counter_; }
9090
protected:
9191
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
92+
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
9293
private Q_SLOTS:
9394
void animate(qreal val);
9495
private:

0 commit comments

Comments
 (0)