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

PixelPaint: Expose the GUI event loop from the ImageEditor

This allows processing threads to call back into the GUI.
This commit is contained in:
kleines Filmröllchen 2022-08-13 13:03:23 +02:00 committed by Sam Atkins
parent 056b081e2d
commit 9483adee46
2 changed files with 6 additions and 0 deletions

View file

@ -30,6 +30,7 @@ constexpr int marching_ant_length = 4;
ImageEditor::ImageEditor(NonnullRefPtr<Image> image)
: m_image(move(image))
, m_title("Untitled")
, m_gui_event_loop(Core::EventLoop::current())
{
set_focus_policy(GUI::FocusPolicy::StrongFocus);
m_undo_stack.push(make<ImageUndoCommand>(*m_image, String()));