1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:57:44 +00:00

PixelPaint: Keep a RefPtr to layer in LayerPropertiesWidget

Using a WeakPtr to keep a reference to the active layer caused it to
be destroyed when the last tab was closed, which made the
m_layer == layer check in set_layer() return early since it was
already null. Because of this the LayerPropertiesWidget was never
disabled.
This commit is contained in:
Marcus Nilsson 2022-01-09 13:41:38 +01:00 committed by Linus Groh
parent 7ca4d045bd
commit 18e6da6d4d
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@ private:
RefPtr<GUI::OpacitySlider> m_opacity_slider;
RefPtr<GUI::TextBox> m_name_textbox;
WeakPtr<Layer> m_layer;
RefPtr<Layer> m_layer;
};
}