mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
PixelPaint: Don't const_cast to update the editor on filter application
This commit is contained in:
parent
faf9d08371
commit
ba236e3f21
Notes:
sideshowbarker
2024-07-17 18:46:57 +09:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/SerenityOS/serenity/commit/ba236e3f21 Pull-request: https://github.com/SerenityOS/serenity/pull/20389 Reviewed-by: https://github.com/BertalanD ✅
1 changed files with 1 additions and 2 deletions
|
@ -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<NonnullRefPtr<Layer>*>(&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()));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue