mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:27:35 +00:00
PixelPaint: Make ImageEditor::image() return a reference (Image&)
In the new tabbed world, every ImageEditor always has an associated Image, so this simplifies a bunch of things. :^)
This commit is contained in:
parent
c6dd3377ee
commit
35456f035c
4 changed files with 19 additions and 31 deletions
|
@ -377,13 +377,9 @@ void ImageEditor::reset_scale_and_position()
|
|||
|
||||
void ImageEditor::relayout()
|
||||
{
|
||||
if (!image())
|
||||
return;
|
||||
auto& image = *this->image();
|
||||
|
||||
Gfx::IntSize new_size;
|
||||
new_size.set_width(image.size().width() * m_scale);
|
||||
new_size.set_height(image.size().height() * m_scale);
|
||||
new_size.set_width(image().size().width() * m_scale);
|
||||
new_size.set_height(image().size().height() * m_scale);
|
||||
m_editor_image_rect.set_size(new_size);
|
||||
|
||||
Gfx::IntPoint new_location;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue