BlockView selection fix - many bugs with 1 fix (ctrl+click, ctrl+selection_rect, selection disappear)

This commit is contained in:
2020-10-14 01:47:15 +03:00
parent 32f2c061d1
commit 59711afa14
2 changed files with 9 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
#include "blockview.h"
#include <QApplication>
BlockBusItem::BlockBusItem(bool temp): QGraphicsObject(), PropertyStorage() {
@@ -572,6 +573,11 @@ void BlockBusItem::hoverLeaveEvent(QGraphicsSceneHoverEvent * e) {
setPen(pu); setBrush(bu);
setToolTip(QString());
anim_point_size.stop();
BlockView * bv = 0;
if (!scene()->views().isEmpty())
bv = qobject_cast<BlockView*>(scene()->views().back());
if (bv && (QApplication::mouseButtons() == 0))
bv->cur_bus = 0;
update();
QGraphicsObject::hoverLeaveEvent(e);
}