From 4df7de36c11c8d7779e06029e89b5839831d0816 Mon Sep 17 00:00:00 2001 From: SoundSSGood <87084363+SoundSSGood@users.noreply.github.com> Date: Thu, 11 Jan 2024 13:52:12 +0200 Subject: [PATCH] fixed regression --- client/widgets/markets/CAltarCreatures.cpp | 2 ++ client/widgets/markets/CTradeBase.cpp | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/client/widgets/markets/CAltarCreatures.cpp b/client/widgets/markets/CAltarCreatures.cpp index 908ce602e..66161e2f7 100644 --- a/client/widgets/markets/CAltarCreatures.cpp +++ b/client/widgets/markets/CAltarCreatures.cpp @@ -51,6 +51,8 @@ CAltarCreatures::CAltarCreatures(const IMarket * market, const CGHeroInstance * assert(leftTradePanel); leftTradePanel->moveBy(Point(45, 110)); leftTradePanel->updateSlotsCallback = std::bind(&CCreaturesSelling::updateSubtitle, this); + for(const auto & slot : leftTradePanel->slots) + slot->clickPressedCallback = [this](const std::shared_ptr & heroSlot) {CAltarCreatures::onSlotClickPressed(heroSlot, hLeft);}; // Altar creatures panel rightTradePanel = std::make_shared([this](const std::shared_ptr & altarSlot) diff --git a/client/widgets/markets/CTradeBase.cpp b/client/widgets/markets/CTradeBase.cpp index 2dacc01e2..62f792862 100644 --- a/client/widgets/markets/CTradeBase.cpp +++ b/client/widgets/markets/CTradeBase.cpp @@ -90,10 +90,7 @@ CCreaturesSelling::CCreaturesSelling() if(const auto & creature = hero->getCreature(slotId)) slots.emplace_back(std::make_tuple(creature->getId(), slotId, hero->getStackCount(slotId))); } - leftTradePanel = std::make_shared([this](const std::shared_ptr & altarSlot) - { - CTradeBase::onSlotClickPressed(altarSlot, hLeft); - }, slots); + leftTradePanel = std::make_shared(nullptr, slots); } bool CCreaturesSelling::slotDeletingCheck(const std::shared_ptr & slot)