update clone object sprite icon with target change
This commit is contained in:
parent
73ccc3d89d
commit
715c37572e
1 changed files with 5 additions and 0 deletions
|
@ -435,10 +435,14 @@ void CloneObjectFrame::connectSignals() {
|
||||||
|
|
||||||
EventFrame::connectSignals();
|
EventFrame::connectSignals();
|
||||||
|
|
||||||
|
// update icon displayed in frame with target
|
||||||
|
connect(this->clone->getPixmapItem(), &DraggablePixmapItem::spriteChanged, this->label_icon, &QLabel::setPixmap);
|
||||||
|
|
||||||
// target map
|
// target map
|
||||||
this->combo_target_map->disconnect();
|
this->combo_target_map->disconnect();
|
||||||
connect(this->combo_target_map, &QComboBox::currentTextChanged, [this](const QString &text) {
|
connect(this->combo_target_map, &QComboBox::currentTextChanged, [this](const QString &text) {
|
||||||
this->clone->setTargetMap(text);
|
this->clone->setTargetMap(text);
|
||||||
|
this->clone->getPixmapItem()->updatePixmap();
|
||||||
this->clone->modify();
|
this->clone->modify();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -446,6 +450,7 @@ void CloneObjectFrame::connectSignals() {
|
||||||
this->spinner_target_id->disconnect();
|
this->spinner_target_id->disconnect();
|
||||||
connect(this->spinner_target_id, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) {
|
connect(this->spinner_target_id, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) {
|
||||||
this->clone->setTargetID(value);
|
this->clone->setTargetID(value);
|
||||||
|
this->clone->getPixmapItem()->updatePixmap();
|
||||||
this->clone->modify();
|
this->clone->modify();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue