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;
|
||||
if (tmp_bus.isVisible()) {
|
||||
//qDebug() << "!!!";
|
||||
if (match_bus == 0) {
|
||||
BlockBusItem * nb = new BlockBusItem(tmp_bus);
|
||||
addItem(nb, tmp_buses.isEmpty());
|
||||
foreach (BlockBusItem * b, tmp_buses) {
|
||||
nb = new BlockBusItem(*b);
|
||||
addItem(nb, b == tmp_buses.back());
|
||||
}
|
||||
} else {
|
||||
if (connectTmpToBus(match_bus)) {
|
||||
emitActionEvent(BlockItemBase::BusAdd, QList<QGraphicsItem*>() << match_bus);
|
||||
emit connectionsChanged();
|
||||
if (!tmp_bus.pol.isEmpty()) {
|
||||
if (match_bus == 0) {
|
||||
BlockBusItem * nb = new BlockBusItem(tmp_bus);
|
||||
addItem(nb, tmp_buses.isEmpty());
|
||||
foreach (BlockBusItem * b, tmp_buses) {
|
||||
nb = new BlockBusItem(*b);
|
||||
addItem(nb, b == tmp_buses.back());
|
||||
}
|
||||
} else {
|
||||
if (connectTmpToBus(match_bus)) {
|
||||
emitActionEvent(BlockItemBase::BusAdd, QList<QGraphicsItem*>() << match_bus);
|
||||
emit connectionsChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
unmarkPins();
|
||||
hideTmpBuses();
|
||||
reconnectAll();
|
||||
BlockItemPin * pin = getPin(scene_->items(me->scenePos()));
|
||||
if (pin)
|
||||
pin->hoverEnterEvent(0);
|
||||
}
|
||||
clearBusStates();
|
||||
if (!mm_drag) {
|
||||
@@ -1492,7 +1496,7 @@ QList<BlockItemPin * > BlockView::nearPins(BlockItemPin * pin, Qt::KeyboardModif
|
||||
//qDebug() << "dir" << dirs[i];
|
||||
while (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);
|
||||
if (np == cpin) break;
|
||||
cpin = np;
|
||||
|
||||
Reference in New Issue
Block a user