Merge branch '1.0'

Conflicts:
	src/app/commands/cmd_flip.cpp
This commit is contained in:
David Capello 2015-01-27 10:00:37 -03:00
commit 6fd448d9dc

View File

@ -129,14 +129,16 @@ void FlipCommand::onExecute(Context* context)
// Flip the portion of image specified by "bounds" variable.
if (!alreadyFlipped) {
api.setCelPosition
(sprite, cel,
(m_flipType == doc::algorithm::FlipHorizontal ?
sprite->width() - image->width() - cel->x():
cel->x()),
(m_flipType == doc::algorithm::FlipVertical ?
sprite->height() - image->height() - cel->y():
cel->y()));
if (!document->isMaskVisible()) {
api.setCelPosition
(sprite, cel,
(m_flipType == doc::algorithm::FlipHorizontal ?
sprite->width() - image->width() - cel->x():
cel->x()),
(m_flipType == doc::algorithm::FlipVertical ?
sprite->height() - image->height() - cel->y():
cel->y()));
}
api.flipImage(image, bounds, m_flipType);
}