sideboarding bug fix
This commit is contained in:
parent
6cebad2513
commit
f6849ff02b
3 changed files with 7 additions and 7 deletions
|
@ -584,10 +584,8 @@ QStringList CardDatabase::getAllMainCardTypes() const
|
||||||
|
|
||||||
void CardDatabase::cacheCardPixmaps(const QStringList &cardNames)
|
void CardDatabase::cacheCardPixmaps(const QStringList &cardNames)
|
||||||
{
|
{
|
||||||
qDebug("pixmapCache started");
|
|
||||||
for (int i = 0; i < cardNames.size(); ++i)
|
for (int i = 0; i < cardNames.size(); ++i)
|
||||||
getCard(cardNames[i])->loadPixmap();
|
getCard(cardNames[i])->loadPixmap();
|
||||||
qDebug("pixmapCache finished");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CardDatabase::loadImage(CardInfo *card)
|
void CardDatabase::loadImage(CardInfo *card)
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include "carddatabase.h"
|
#include "carddatabase.h"
|
||||||
#include "settingscache.h"
|
#include "settingscache.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
DeckViewCardDragItem::DeckViewCardDragItem(DeckViewCard *_item, const QPointF &_hotSpot, AbstractCardDragItem *parentDrag)
|
DeckViewCardDragItem::DeckViewCardDragItem(DeckViewCard *_item, const QPointF &_hotSpot, AbstractCardDragItem *parentDrag)
|
||||||
: AbstractCardDragItem(_item, _hotSpot, parentDrag), currentZone(0)
|
: AbstractCardDragItem(_item, _hotSpot, parentDrag), currentZone(0)
|
||||||
|
@ -23,7 +22,6 @@ void DeckViewCardDragItem::updatePosition(const QPointF &cursorScenePos)
|
||||||
if (!cursorZone)
|
if (!cursorZone)
|
||||||
return;
|
return;
|
||||||
currentZone = cursorZone;
|
currentZone = cursorZone;
|
||||||
qDebug() << currentZone;
|
|
||||||
|
|
||||||
QPointF newPos = cursorScenePos;
|
QPointF newPos = cursorScenePos;
|
||||||
if (newPos != pos()) {
|
if (newPos != pos()) {
|
||||||
|
@ -121,7 +119,6 @@ void DeckViewCard::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||||
DeckViewCardContainer::DeckViewCardContainer(const QString &_name)
|
DeckViewCardContainer::DeckViewCardContainer(const QString &_name)
|
||||||
: QGraphicsItem(), name(_name), width(0), height(0), maxWidth(0)
|
: QGraphicsItem(), name(_name), width(0), height(0), maxWidth(0)
|
||||||
{
|
{
|
||||||
qDebug() << "CardContainer constructor: name=" << _name << "; this=" << this;
|
|
||||||
QString bgPath = settingsCache->getTableBgPath();
|
QString bgPath = settingsCache->getTableBgPath();
|
||||||
if (!bgPath.isEmpty())
|
if (!bgPath.isEmpty())
|
||||||
bgPixmap.load(bgPath);
|
bgPixmap.load(bgPath);
|
||||||
|
|
|
@ -292,6 +292,7 @@ bool DeckList::readElement(QXmlStreamReader *xml)
|
||||||
sideboardPlans.insert(currentSideboardPlan->getName(), currentSideboardPlan);
|
sideboardPlans.insert(currentSideboardPlan->getName(), currentSideboardPlan);
|
||||||
currentSideboardPlan = 0;
|
currentSideboardPlan = 0;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
} else if (xml->isEndElement()) {
|
} else if (xml->isEndElement()) {
|
||||||
if (xml->name() == "deckname")
|
if (xml->name() == "deckname")
|
||||||
name = currentElementText;
|
name = currentElementText;
|
||||||
|
@ -301,9 +302,13 @@ bool DeckList::readElement(QXmlStreamReader *xml)
|
||||||
currentElementText.clear();
|
currentElementText.clear();
|
||||||
} else if (xml->isStartElement() && (xml->name() == "zone"))
|
} else if (xml->isStartElement() && (xml->name() == "zone"))
|
||||||
currentZone = new InnerDecklistNode(xml->attributes().value("name").toString(), root);
|
currentZone = new InnerDecklistNode(xml->attributes().value("name").toString(), root);
|
||||||
else if (xml->isStartElement() && (xml->name() == "sideboard_plan"))
|
else if (xml->isStartElement() && (xml->name() == "sideboard_plan")) {
|
||||||
currentSideboardPlan = new SideboardPlan;
|
currentSideboardPlan = new SideboardPlan;
|
||||||
else if (xml->isCharacters() && !xml->isWhitespace())
|
if (currentSideboardPlan->readElement(xml)) {
|
||||||
|
sideboardPlans.insert(currentSideboardPlan->getName(), currentSideboardPlan);
|
||||||
|
currentSideboardPlan = 0;
|
||||||
|
}
|
||||||
|
} else if (xml->isCharacters() && !xml->isWhitespace())
|
||||||
currentElementText = xml->text().toString();
|
currentElementText = xml->text().toString();
|
||||||
return SerializableItem::readElement(xml);
|
return SerializableItem::readElement(xml);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue