diff options
author | Marcus Nilsson <brainbomb@gmail.com> | 2021-08-06 11:57:56 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-06 23:59:14 +0200 |
commit | 4a57a4a0b36b5d3738bd6704c34dc69eef1d481b (patch) | |
tree | 6808aa875b8496e5dda826157ee836eaec15cd87 /Userland/Applications/PixelPaint/ToolPropertiesWidget.h | |
parent | 2e6fc13b1e99a6d9de763ee93ed7f3140f908530 (diff) | |
download | serenity-4a57a4a0b36b5d3738bd6704c34dc69eef1d481b.zip |
PixelPaint: Use a StackWidget in ToolPropertiesWidget
Previously changing tools while simultaneously using a widget like a
slider would result in a event_dispatch() failure.
Instead use a StackWidget to set the active widget.
Diffstat (limited to 'Userland/Applications/PixelPaint/ToolPropertiesWidget.h')
-rw-r--r-- | Userland/Applications/PixelPaint/ToolPropertiesWidget.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/ToolPropertiesWidget.h b/Userland/Applications/PixelPaint/ToolPropertiesWidget.h index 5f2a5bf2a1..925d08c5ef 100644 --- a/Userland/Applications/PixelPaint/ToolPropertiesWidget.h +++ b/Userland/Applications/PixelPaint/ToolPropertiesWidget.h @@ -8,6 +8,7 @@ #include <AK/RefPtr.h> #include <LibGUI/Forward.h> +#include <LibGUI/StackWidget.h> #include <LibGUI/Widget.h> namespace PixelPaint { @@ -28,6 +29,8 @@ private: RefPtr<GUI::GroupBox> m_group_box; Tool* m_active_tool { nullptr }; + RefPtr<GUI::StackWidget> m_tool_widget_stack; + RefPtr<GUI::Widget> m_blank_widget; GUI::Widget* m_active_tool_widget { nullptr }; }; |