mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
PixelPaint: Improve guide tool performance for large images
This commit ensures that the vectorscope and histogram widgets are not updated while moving a guide with the guide tool. This significantly improves performance for large images.
This commit is contained in:
parent
4a0af3dc77
commit
7e020154a5
Notes:
sideshowbarker
2024-07-17 09:41:18 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/7e020154a5 Pull-request: https://github.com/SerenityOS/serenity/pull/16546 Reviewed-by: https://github.com/nico ✅
@ -91,7 +91,7 @@ void GuideTool::on_mouseup(Layer*, MouseEvent&)
|
||||
|| (m_selected_guide->orientation() == Guide::Orientation::Horizontal && m_selected_guide->offset() > editor()->image().size().height())
|
||||
|| (m_selected_guide->orientation() == Guide::Orientation::Vertical && m_selected_guide->offset() > editor()->image().size().width())) {
|
||||
editor()->remove_guide(*m_selected_guide);
|
||||
editor()->layers_did_change();
|
||||
editor()->update();
|
||||
}
|
||||
|
||||
m_selected_guide = nullptr;
|
||||
@ -122,7 +122,7 @@ void GuideTool::on_mousemove(Layer*, MouseEvent& event)
|
||||
|
||||
GUI::Application::the()->show_tooltip_immediately(DeprecatedString::formatted("{}", new_offset), GUI::Application::the()->tooltip_source_widget());
|
||||
|
||||
editor()->layers_did_change();
|
||||
editor()->update();
|
||||
}
|
||||
|
||||
void GuideTool::on_context_menu(Layer*, GUI::ContextMenuEvent& event)
|
||||
|
Loading…
Reference in New Issue
Block a user