git-svn-id: svn://db.shs.com.ru/libs@404 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -531,23 +531,27 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) {
|
|||||||
}
|
}
|
||||||
moved = mm_copy = false;
|
moved = mm_copy = false;
|
||||||
if (tmp_bus.isVisible()) {
|
if (tmp_bus.isVisible()) {
|
||||||
//qDebug() << "!!!";
|
if (!tmp_bus.pol.isEmpty()) {
|
||||||
if (match_bus == 0) {
|
if (match_bus == 0) {
|
||||||
BlockBusItem * nb = new BlockBusItem(tmp_bus);
|
BlockBusItem * nb = new BlockBusItem(tmp_bus);
|
||||||
addItem(nb, tmp_buses.isEmpty());
|
addItem(nb, tmp_buses.isEmpty());
|
||||||
foreach (BlockBusItem * b, tmp_buses) {
|
foreach (BlockBusItem * b, tmp_buses) {
|
||||||
nb = new BlockBusItem(*b);
|
nb = new BlockBusItem(*b);
|
||||||
addItem(nb, b == tmp_buses.back());
|
addItem(nb, b == tmp_buses.back());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (connectTmpToBus(match_bus)) {
|
if (connectTmpToBus(match_bus)) {
|
||||||
emitActionEvent(BlockItemBase::BusAdd, QList<QGraphicsItem*>() << match_bus);
|
emitActionEvent(BlockItemBase::BusAdd, QList<QGraphicsItem*>() << match_bus);
|
||||||
emit connectionsChanged();
|
emit connectionsChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unmarkPins();
|
unmarkPins();
|
||||||
hideTmpBuses();
|
hideTmpBuses();
|
||||||
reconnectAll();
|
reconnectAll();
|
||||||
|
BlockItemPin * pin = getPin(scene_->items(me->scenePos()));
|
||||||
|
if (pin)
|
||||||
|
pin->hoverEnterEvent(0);
|
||||||
}
|
}
|
||||||
clearBusStates();
|
clearBusStates();
|
||||||
if (!mm_drag) {
|
if (!mm_drag) {
|
||||||
@@ -1492,7 +1496,7 @@ QList<BlockItemPin * > BlockView::nearPins(BlockItemPin * pin, Qt::KeyboardModif
|
|||||||
//qDebug() << "dir" << dirs[i];
|
//qDebug() << "dir" << dirs[i];
|
||||||
while (cpin) {
|
while (cpin) {
|
||||||
//qDebug() << "cur" << cpin;
|
//qDebug() << "cur" << cpin;
|
||||||
QList<QGraphicsItem * > il = items(mapFromScene(cpin->scenePos() + QPointF(0., dy[i] * cb->pinsMargin())));
|
QList<QGraphicsItem * > il = scene_->items(cpin->scenePos() + QPointF(0., dy[i] * cb->pinsMargin()));
|
||||||
BlockItemPin * np = getPin(il);
|
BlockItemPin * np = getPin(il);
|
||||||
if (np == cpin) break;
|
if (np == cpin) break;
|
||||||
cpin = np;
|
cpin = np;
|
||||||
|
|||||||
Reference in New Issue
Block a user