git-svn-id: svn://db.shs.com.ru/libs@157 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2017-01-16 17:26:19 +00:00
parent 36ed688973
commit d84f78e4e8
6 changed files with 896 additions and 1 deletions

View File

@@ -260,6 +260,8 @@ void BlockItem::loadModel(const QByteArray & data) {
//qDebug() << "load from" << data.size() << "bytes";
clearPins();
clearDecors();
col = Qt::lightGray;
_resize(QSizeF(100., 60.));
if (data.isEmpty()) return;
/*QDataStream s(data);
{QPointF _v; s >> _v;}
@@ -407,7 +409,8 @@ void BlockItem::mouseMoveEvent(QGraphicsSceneMouseEvent * event) {
void BlockItem::arrangePins() {
//double w = g_main.rect().width(), h = g_main.rect().height();
QVector<BlockItemPin * > pl = pins();
QSet<BlockItemPin * > pl;
pl = pl.fromList(pins().toList());
pins_.clear();
foreach (BlockItemPin * p, pl)
pins_[p->alignment()] << p;