From ba236e3f213c8786d7bedbac7fe668c55fe501d1 Mon Sep 17 00:00:00 2001 From: Zaggy1024 Date: Sun, 6 Aug 2023 02:46:19 -0500 Subject: [PATCH] PixelPaint: Don't const_cast to update the editor on filter application --- Userland/Applications/PixelPaint/ImageProcessor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Userland/Applications/PixelPaint/ImageProcessor.cpp b/Userland/Applications/PixelPaint/ImageProcessor.cpp index de5be0ce57..6cbb6907c6 100644 --- a/Userland/Applications/PixelPaint/ImageProcessor.cpp +++ b/Userland/Applications/PixelPaint/ImageProcessor.cpp @@ -30,8 +30,7 @@ void FilterApplicationCommand::execute() } m_filter->m_editor->gui_event_loop().deferred_invoke([strong_this = NonnullRefPtr(*this)]() { - // HACK: we can't tell strong_this to not be const - (*const_cast*>(&strong_this->m_target_layer))->did_modify_bitmap(strong_this->m_target_layer->rect()); + strong_this->m_target_layer->did_modify_bitmap(strong_this->m_target_layer->rect()); strong_this->m_filter->m_editor->did_complete_action(DeprecatedString::formatted("Filter {}", strong_this->m_filter->filter_name())); }); }