git-svn-id: svn://db.shs.com.ru/libs@175 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -248,6 +248,7 @@ void BlockEditor::on_treePins_itemChanged(QTreeWidgetItem * item, int column) {
|
||||
|
||||
void BlockEditor::arrangePins() {
|
||||
QVector<BlockItemPin * > pins = block.pins();
|
||||
// block.clearPins();
|
||||
QList<QTreeWidgetItem*> tli = pin_tli.values();
|
||||
foreach (QTreeWidgetItem * ti, tli) {
|
||||
for (int i = 0; i < ti->childCount(); ++i) {
|
||||
@@ -338,3 +339,9 @@ void PinBusDelegate::setModelData(QWidget * editor, QAbstractItemModel * model,
|
||||
model->setData(index, ((QSpinBox*)editor)->value());
|
||||
}
|
||||
|
||||
|
||||
|
||||
//void BlockEditor::on_treePins_itemSelectionChanged() {
|
||||
// arrangePins();
|
||||
// qDebug() << "111111111111111";
|
||||
//}
|
||||
|
||||
@@ -40,6 +40,7 @@ private slots:
|
||||
void on_buttonPinDelete_clicked();
|
||||
void on_buttonPinClear_clicked();
|
||||
void on_treePins_itemChanged(QTreeWidgetItem *item, int column);
|
||||
// void on_treePins_itemSelectionChanged();
|
||||
|
||||
private:
|
||||
bool eventFilter(QObject * o, QEvent * e);
|
||||
|
||||
@@ -139,7 +139,7 @@ void BlockItem::_resize(QSizeF s) {
|
||||
|
||||
BlockItemPin * BlockItem::addPin(BlockItemPin * pin, bool update_) {
|
||||
pin->setParentItem(this);
|
||||
pins_[pin->alignment()] << pin;
|
||||
if (!pins_[pin->alignment()].contains(pin)) pins_[pin->alignment()] << pin;
|
||||
pin->parent_ = this;
|
||||
if (update_)
|
||||
arrangePins();
|
||||
|
||||
Reference in New Issue
Block a user