mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
crash fixes; move_card fixes
This commit is contained in:
parent
2aa5c7eb3c
commit
d23ece59ea
12 changed files with 43 additions and 10 deletions
|
|
@ -52,6 +52,7 @@ ZoneViewWidget::ZoneViewWidget(Player *_player, CardZone *_origZone, int numberC
|
|||
|
||||
zone = new ZoneViewZone(player, _origZone, numberCards, this);
|
||||
connect(zone, SIGNAL(contentsChanged()), this, SLOT(resizeToZoneContents()));
|
||||
connect(zone, SIGNAL(beingDeleted()), this, SLOT(zoneDeleted()));
|
||||
zone->dumpObjectInfo();
|
||||
vbox->addItem(zone);
|
||||
zone->initializeCards();
|
||||
|
|
@ -91,6 +92,7 @@ void ZoneViewWidget::resizeToZoneContents()
|
|||
|
||||
void ZoneViewWidget::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
disconnect(zone, SIGNAL(beingDeleted()), this, 0);
|
||||
player->sendGameCommand(new Command_StopDumpZone(-1, player->getId(), zone->getName()));
|
||||
if (shuffleCheckBox)
|
||||
if (shuffleCheckBox->isChecked())
|
||||
|
|
@ -99,3 +101,10 @@ void ZoneViewWidget::closeEvent(QCloseEvent *event)
|
|||
deleteLater();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void ZoneViewWidget::zoneDeleted()
|
||||
{
|
||||
emit closePressed(this);
|
||||
qDebug("foo");
|
||||
deleteLater();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue