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:
Tim Ledbetter 2022-12-17 02:42:14 +00:00 committed by Sam Atkins
parent 4a0af3dc77
commit 7e020154a5
Notes: sideshowbarker 2024-07-17 09:41:18 +09:00

View File

@ -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)