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
d264191e
Commit
d264191e
authored
Oct 17, 2014
by
Gavin Bisesi
Browse files
Merge pull request #381 from poixen/abstractcarddragitemcleanup
Removed inline logic
parents
2a15b9c9
80fd0fbc
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/abstractcarddragitem.cpp
View file @
d264191e
...
...
@@ -4,6 +4,9 @@
#include
<QGraphicsSceneMouseEvent>
#include
<QDebug>
static
const
float
CARD_WIDTH_HALF
=
CARD_WIDTH
/
2
;
static
const
float
CARD_HEIGHT_HALF
=
CARD_HEIGHT
/
2
;
AbstractCardDragItem
::
AbstractCardDragItem
(
AbstractCardItem
*
_item
,
const
QPointF
&
_hotSpot
,
AbstractCardDragItem
*
parentDrag
)
:
QGraphicsItem
(),
item
(
_item
),
hotSpot
(
_hotSpot
)
{
...
...
@@ -22,7 +25,7 @@ AbstractCardDragItem::AbstractCardDragItem(AbstractCardItem *_item, const QPoint
setZValue
(
2000000007
);
}
if
(
item
->
getTapped
())
setTransform
(
QTransform
().
translate
(
(
float
)
CARD_WIDTH
/
2
,
(
float
)
CARD_HEIGHT
/
2
).
rotate
(
90
).
translate
(
(
float
)
-
CARD_WIDTH
/
2
,
(
float
)
-
CARD_HEIGHT
/
2
));
setTransform
(
QTransform
().
translate
(
CARD_WIDTH
_HALF
,
CARD_HEIGHT
_HALF
).
rotate
(
90
).
translate
(
-
CARD_WIDTH
_HALF
,
-
CARD_HEIGHT
_HALF
));
setCacheMode
(
DeviceCoordinateCache
);
}
...
...
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