Skip to content

Commit

Permalink
ScaleManipulator: return *copy* of preview bitmap if dimensions don't…
Browse files Browse the repository at this point in the history
… change.
  • Loading branch information
dsizzle authored and humdingerb committed Oct 31, 2023
1 parent a675dac commit f8625dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions artpaint/viewmanipulators/ScaleManipulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,12 @@ ScaleManipulator::ManipulateBitmap(
&& new_settings->left == original_left && new_settings->top == original_top)
return NULL;

if (new_width == starting_width && new_height == starting_height)
return preview_bitmap;
if (new_width == starting_width && new_height == starting_height) {
if (final_bitmap != NULL)
delete final_bitmap;
final_bitmap = new BBitmap(preview_bitmap, B_RGBA32);
return final_bitmap;
}

BMessage progress_message = BMessage(B_UPDATE_STATUS_BAR);
progress_message.AddFloat("delta", 0.0);
Expand Down

0 comments on commit f8625dc

Please sign in to comment.