Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
a67883ca
Commit
a67883ca
authored
Nov 10, 2010
by
Max-Wilhelm Bruker
Browse files
stack arrow bug fix; minor spanish translation fix
parent
1ef865b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/stackzone.cpp
View file @
a67883ca
#include
<QPainter>
#include
<QPainter>
#include
<QSet>
#include
"arrowitem.h"
#include
"stackzone.h"
#include
"stackzone.h"
#include
"settingscache.h"
#include
"settingscache.h"
#include
"player.h"
#include
"player.h"
...
@@ -59,6 +61,8 @@ void StackZone::handleDropEvent(int cardId, CardZone *startZone, const QPoint &/
...
@@ -59,6 +61,8 @@ void StackZone::handleDropEvent(int cardId, CardZone *startZone, const QPoint &/
void
StackZone
::
reorganizeCards
()
void
StackZone
::
reorganizeCards
()
{
{
if
(
!
cards
.
isEmpty
())
{
if
(
!
cards
.
isEmpty
())
{
QList
<
ArrowItem
*>
arrowsToUpdate
;
const
int
cardCount
=
cards
.
size
();
const
int
cardCount
=
cards
.
size
();
qreal
totalWidth
=
boundingRect
().
width
();
qreal
totalWidth
=
boundingRect
().
width
();
qreal
totalHeight
=
boundingRect
().
height
();
qreal
totalHeight
=
boundingRect
().
height
();
...
@@ -78,7 +82,13 @@ void StackZone::reorganizeCards()
...
@@ -78,7 +82,13 @@ void StackZone::reorganizeCards()
else
else
c
->
setPos
(
x
,
((
qreal
)
i
)
*
cardHeight
+
(
totalHeight
-
cardCount
*
cardHeight
)
/
2
);
c
->
setPos
(
x
,
((
qreal
)
i
)
*
cardHeight
+
(
totalHeight
-
cardCount
*
cardHeight
)
/
2
);
c
->
setRealZValue
(
i
);
c
->
setRealZValue
(
i
);
arrowsToUpdate
.
append
(
c
->
getArrowsFrom
());
arrowsToUpdate
.
append
(
c
->
getArrowsTo
());
}
}
QSetIterator
<
ArrowItem
*>
arrowIterator
(
QSet
<
ArrowItem
*>::
fromList
(
arrowsToUpdate
));
while
(
arrowIterator
.
hasNext
())
arrowIterator
.
next
()
->
updatePath
();
}
}
update
();
update
();
}
}
cockatrice/translations/cockatrice_es.ts
View file @
a67883ca
...
@@ -1358,12 +1358,12 @@
...
@@ -1358,12 +1358,12 @@
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
148
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
148
"
/>
<
source
>
from
table
<
/source
>
<
source
>
from
table
<
/source
>
<
translation
>
de
la
mesa
<
/translation
>
<
translation
>
de
la
mesa
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
150
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
150
"
/>
<
source
>
from
graveyard
<
/source
>
<
source
>
from
graveyard
<
/source
>
<
translation
>
del
cementerio
<
/translation
>
<
translation
>
del
cementerio
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
152
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
152
"
/>
...
@@ -1373,7 +1373,7 @@
...
@@ -1373,7 +1373,7 @@
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
154
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
154
"
/>
<
source
>
from
hand
<
/source
>
<
source
>
from
hand
<
/source
>
<
translation
>
de
la
mano
<
/translation
>
<
translation
>
de
la
mano
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
158
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
158
"
/>
...
@@ -1383,7 +1383,7 @@
...
@@ -1383,7 +1383,7 @@
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
161
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
161
"
/>
<
source
>
from
the
bottom
of
his
library
<
/source
>
<
source
>
from
the
bottom
of
his
library
<
/source
>
<
translation
>
del
fondo
de
la
biblioteca
<
/translation
>
<
translation
>
del
fondo
de
la
biblioteca
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
164
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
164
"
/>
...
@@ -1393,22 +1393,22 @@
...
@@ -1393,22 +1393,22 @@
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
167
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
167
"
/>
<
source
>
from
the
top
of
his
library
<
/source
>
<
source
>
from
the
top
of
his
library
<
/source
>
<
translation
>
de
la
parte
superior
de
la
biblioteca
<
/translation
>
<
translation
>
de
la
parte
superior
de
la
biblioteca
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
169
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
169
"
/>
<
source
>
from
library
<
/source
>
<
source
>
from
library
<
/source
>
<
translation
>
de
la
biblioteca
<
/translation
>
<
translation
>
de
la
biblioteca
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
171
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
171
"
/>
<
source
>
from
sideboard
<
/source
>
<
source
>
from
sideboard
<
/source
>
<
translation
>
de
la
reserva
<
/translation
>
<
translation
>
de
la
reserva
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
194
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
194
"
/>
<
source
>%
1
puts
%
2
into
play
%
3
.
<
/source
>
<
source
>%
1
puts
%
2
into
play
%
3
.
<
/source
>
<
translation
>%
1
pone
%
2
en
juego
%
3
.
<
/translation
>
<
translation
>%
1
pone
%
2
en
juego
%
3
.
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
196
"
/>
<
location
filename
=
"
../src/messagelogwidget.cpp
"
line
=
"
196
"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment