don't autoclose card view if single card gets dragged into same zone (#5517)

* rename canResize param to toNewZone

* pass toNewZone down

* don't autoclose card view if card gets dragged into same zone
This commit is contained in:
RickyRister 2025-01-24 18:08:28 -08:00 committed by GitHub
parent 085f0dd26c
commit e8b1e3ef0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 18 additions and 9 deletions

View file

@ -173,7 +173,7 @@ CardItem *CardZone::getCard(int cardId, const QString &cardName)
return c;
}
CardItem *CardZone::takeCard(int position, int cardId, bool /*canResize*/)
CardItem *CardZone::takeCard(int position, int cardId, bool toNewZone)
{
if (position == -1) {
// position == -1 means either that the zone is indexed by card id
@ -190,7 +190,7 @@ CardItem *CardZone::takeCard(int position, int cardId, bool /*canResize*/)
return nullptr;
for (auto *view : views) {
view->removeCard(position);
view->removeCard(position, toNewZone);
}
CardItem *c = cards.takeAt(position);