crash fixes; move_card fixes

This commit is contained in:
Max-Wilhelm Bruker 2009-12-18 19:03:02 +01:00
parent 2aa5c7eb3c
commit d23ece59ea
12 changed files with 43 additions and 10 deletions

View file

@ -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();
}