mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 11:38:49 -07:00
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:
parent
085f0dd26c
commit
e8b1e3ef0c
5 changed files with 18 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue