Skip to content

Commit

Permalink
Fix affected mask areas not repainted
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelaya committed May 19, 2014
1 parent d3108e3 commit 70de0c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions PreviewWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ void PreviewWidget::mousePressEvent(QMouseEvent * event) {
if (addPixels || rmPixels) {
event->accept();
stack->startEditAction(addPixels, layer);
int x = event->x(), y = event->y();
rotate(x, y);
stack->editPixels(x, y, radius);
int x = event->x(), y = event->y(), rx = x, ry = y;
rotate(rx, ry);
stack->editPixels(rx, ry, radius);
render(x - radius, y - radius, x + radius + 1, y + radius + 1);
} else
event->ignore();
Expand All @@ -194,9 +194,9 @@ void PreviewWidget::mousePressEvent(QMouseEvent * event) {
void PreviewWidget::mouseMoveEvent(QMouseEvent * event) {
if (addPixels || rmPixels) {
event->accept();
int x = event->x(), y = event->y();
rotate(x, y);
stack->editPixels(x, y, radius);
int x = event->x(), y = event->y(), rx = x, ry = y;
rotate(rx, ry);
stack->editPixels(rx, ry, radius);
render(x - radius, y - radius, x + radius + 1, y + radius + 1);
} else
event->ignore();
Expand Down

0 comments on commit 70de0c8

Please sign in to comment.