code brush

This commit is contained in:
Бычков Андрей
2022-07-01 17:30:34 +03:00
parent 2fb937a090
commit 883612e835
15 changed files with 49 additions and 260 deletions

View File

@@ -143,8 +143,8 @@ void BlockItemPin::hoverEnterEvent(QGraphicsSceneHoverEvent * e) {
QGraphicsView * v = _view();
bool m_pin_mc = false;
if (v) {
QMetaObject::invokeMethod(v, "getPinMC", Q_ARG(bool*, &m_pin_mc));
QMetaObject::invokeMethod(v, "pinHoverInOut", Qt::QueuedConnection, Q_ARG(BlockItemPin*, this));
qobject_cast<BlockView*>(v)->getPinMC(&m_pin_mc);
QMetaObject::invokeMethod(v, [this, v](){qobject_cast<BlockView*>(v)->pinHoverInOut(this);}, Qt::QueuedConnection);
}
if ((state() != Disconnected) && !m_pin_mc) return;
saveState();
@@ -159,5 +159,7 @@ void BlockItemPin::hoverLeaveEvent(QGraphicsSceneHoverEvent * e) {
restoreState();
enlargePin(false);
update();
if (v) QMetaObject::invokeMethod(v, "pinHoverInOut", Q_ARG(BlockItemPin*, 0));
if (v) {
qobject_cast<BlockView*>(v)->pinHoverInOut(nullptr);
}
}