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();
|
||||
|
||||
// update icon displayed in frame with target
|
||||
connect(this->clone->getPixmapItem(), &DraggablePixmapItem::spriteChanged, this->label_icon, &QLabel::setPixmap);
|
||||
|
||||
// target map
|
||||
this->combo_target_map->disconnect();
|
||||
connect(this->combo_target_map, &QComboBox::currentTextChanged, [this](const QString &text) {
|
||||
this->clone->setTargetMap(text);
|
||||
this->clone->getPixmapItem()->updatePixmap();
|
||||
this->clone->modify();
|
||||
});
|
||||
|
||||
|
@ -446,6 +450,7 @@ void CloneObjectFrame::connectSignals() {
|
|||
this->spinner_target_id->disconnect();
|
||||
connect(this->spinner_target_id, QOverload<int>::of(&QSpinBox::valueChanged), [this](int value) {
|
||||
this->clone->setTargetID(value);
|
||||
this->clone->getPixmapItem()->updatePixmap();
|
||||
this->clone->modify();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue