mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
formatting-fix
This commit is contained in:
parent
69b076e1f9
commit
2931355cfb
5 changed files with 19 additions and 11 deletions
|
|
@ -37,7 +37,7 @@ public:
|
||||||
{
|
{
|
||||||
config = ManaCurveConfig::fromJson(o);
|
config = ManaCurveConfig::fromJson(o);
|
||||||
updateDisplay();
|
updateDisplay();
|
||||||
};
|
}
|
||||||
|
|
||||||
QJsonObject extractConfigFromDialog(QDialog *dlg) const override;
|
QJsonObject extractConfigFromDialog(QDialog *dlg) const override;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public:
|
||||||
bool isCompact() const
|
bool isCompact() const
|
||||||
{
|
{
|
||||||
return compact;
|
return compact;
|
||||||
};
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QMouseEvent *event) override;
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ public:
|
||||||
ICardSetPriorityController *getPriorityController()
|
ICardSetPriorityController *getPriorityController()
|
||||||
{
|
{
|
||||||
return setPriorityController;
|
return setPriorityController;
|
||||||
};
|
}
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -70,29 +70,34 @@ public:
|
||||||
}
|
}
|
||||||
virtual void nodeChanged() const
|
virtual void nodeChanged() const
|
||||||
{
|
{
|
||||||
if (parent() != nullptr)
|
if (parent() != nullptr) {
|
||||||
parent()->nodeChanged();
|
parent()->nodeChanged();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
virtual void preInsertChild(const FilterTreeNode *p, int i) const
|
virtual void preInsertChild(const FilterTreeNode *p, int i) const
|
||||||
{
|
{
|
||||||
if (parent() != nullptr)
|
if (parent() != nullptr) {
|
||||||
parent()->preInsertChild(p, i);
|
parent()->preInsertChild(p, i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
virtual void postInsertChild(const FilterTreeNode *p, int i) const
|
virtual void postInsertChild(const FilterTreeNode *p, int i) const
|
||||||
{
|
{
|
||||||
if (parent() != nullptr)
|
if (parent() != nullptr) {
|
||||||
parent()->postInsertChild(p, i);
|
parent()->postInsertChild(p, i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
virtual void preRemoveChild(const FilterTreeNode *p, int i) const
|
virtual void preRemoveChild(const FilterTreeNode *p, int i) const
|
||||||
{
|
{
|
||||||
if (parent() != nullptr)
|
if (parent() != nullptr) {
|
||||||
parent()->preRemoveChild(p, i);
|
parent()->preRemoveChild(p, i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
virtual void postRemoveChild(const FilterTreeNode *p, int i) const
|
virtual void postRemoveChild(const FilterTreeNode *p, int i) const
|
||||||
{
|
{
|
||||||
if (parent() != nullptr)
|
if (parent() != nullptr) {
|
||||||
parent()->postRemoveChild(p, i);
|
parent()->postRemoveChild(p, i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T> class FilterTreeBranch : public FilterTreeNode
|
template <class T> class FilterTreeBranch : public FilterTreeNode
|
||||||
|
|
|
||||||
|
|
@ -257,8 +257,9 @@ Qt::ItemFlags DeckListModel::flags(const QModelIndex &index) const
|
||||||
void DeckListModel::emitBackgroundUpdates(const QModelIndex &parent)
|
void DeckListModel::emitBackgroundUpdates(const QModelIndex &parent)
|
||||||
{
|
{
|
||||||
int rows = rowCount(parent);
|
int rows = rowCount(parent);
|
||||||
if (rows == 0)
|
if (rows == 0) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QModelIndex topLeft = index(0, 0, parent);
|
QModelIndex topLeft = index(0, 0, parent);
|
||||||
QModelIndex bottomRight = index(rows - 1, columnCount() - 1, parent);
|
QModelIndex bottomRight = index(rows - 1, columnCount() - 1, parent);
|
||||||
|
|
@ -539,8 +540,9 @@ int DeckListModel::findSortedInsertRow(const InnerDecklistNode *parent, const Ca
|
||||||
|
|
||||||
for (int i = 0; i < parent->size(); ++i) {
|
for (int i = 0; i < parent->size(); ++i) {
|
||||||
auto *existingCard = dynamic_cast<DecklistModelCardNode *>(parent->at(i));
|
auto *existingCard = dynamic_cast<DecklistModelCardNode *>(parent->at(i));
|
||||||
if (!existingCard)
|
if (!existingCard) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
bool lessThan = false;
|
bool lessThan = false;
|
||||||
switch (lastKnownColumn) {
|
switch (lastKnownColumn) {
|
||||||
|
|
@ -557,9 +559,10 @@ int DeckListModel::findSortedInsertRow(const InnerDecklistNode *parent, const Ca
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lessThan)
|
if (lessThan) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return parent->size(); // insert at end if no earlier match
|
return parent->size(); // insert at end if no earlier match
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue