From 715c37572e288500f9e43f063296087c24a97fb9 Mon Sep 17 00:00:00 2001 From: garak Date: Sun, 16 Oct 2022 19:45:12 -0400 Subject: [PATCH] update clone object sprite icon with target change --- src/ui/eventframes.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/eventframes.cpp b/src/ui/eventframes.cpp index f8b0eacc..90a88f7f 100644 --- a/src/ui/eventframes.cpp +++ b/src/ui/eventframes.cpp @@ -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::of(&QSpinBox::valueChanged), [this](int value) { this->clone->setTargetID(value); + this->clone->getPixmapItem()->updatePixmap(); this->clone->modify(); }); }