1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-30 23:18:08 +02:00

Merge pull request #3751 from IvanSavenko/fix_dnd_cursor

Fix assertion failure with drag-and-drop cursor
This commit is contained in:
Ivan Savenko 2024-04-13 14:39:19 +03:00 committed by GitHub
commit 95c0551de5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 10 additions and 8 deletions

View File

@ -502,8 +502,6 @@ void handleQuit(bool ask)
return;
}
CCS->curh->set(Cursor::Map::POINTER);
if (LOCPLINT)
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[69], quitApplication, nullptr);
else

View File

@ -34,7 +34,8 @@ CArtifactsOfHeroAltar::CArtifactsOfHeroAltar(const Point & position)
rightBackpackRoll->moveBy(Point(2, -1));
};
CArtifactsOfHeroAltar::~CArtifactsOfHeroAltar()
void CArtifactsOfHeroAltar::deactivate()
{
putBackPickedArtifact();
CArtifactsOfHeroBase::deactivate();
}

View File

@ -17,5 +17,5 @@ class CArtifactsOfHeroAltar : public CArtifactsOfHeroBase
{
public:
CArtifactsOfHeroAltar(const Point & position);
~CArtifactsOfHeroAltar();
void deactivate() override;
};

View File

@ -46,7 +46,8 @@ CArtifactsOfHeroKingdom::CArtifactsOfHeroKingdom(ArtPlaceMap ArtWorn, std::vecto
setRedrawParent(true);
}
CArtifactsOfHeroKingdom::~CArtifactsOfHeroKingdom()
void CArtifactsOfHeroKingdom::deactivate()
{
putBackPickedArtifact();
CArtifactsOfHeroBase::deactivate();
}

View File

@ -23,5 +23,6 @@ public:
CArtifactsOfHeroKingdom() = delete;
CArtifactsOfHeroKingdom(ArtPlaceMap ArtWorn, std::vector<ArtPlacePtr> Backpack,
std::shared_ptr<CButton> leftScroll, std::shared_ptr<CButton> rightScroll);
~CArtifactsOfHeroKingdom();
void deactivate() override;
};

View File

@ -26,7 +26,8 @@ CArtifactsOfHeroMain::CArtifactsOfHeroMain(const Point & position)
addGestureCallback(std::bind(&CArtifactsOfHeroBase::gestureArtPlace, this, _1, _2));
}
CArtifactsOfHeroMain::~CArtifactsOfHeroMain()
void CArtifactsOfHeroMain::deactivate()
{
putBackPickedArtifact();
CArtifactsOfHeroBase::deactivate();
}

View File

@ -21,5 +21,5 @@ class CArtifactsOfHeroMain : public CArtifactsOfHeroBase
{
public:
CArtifactsOfHeroMain(const Point & position);
~CArtifactsOfHeroMain();
void deactivate() override;
};