Browse Source

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.
Tim Ledbetter 2 years ago
parent
commit
7e020154a5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Userland/Applications/PixelPaint/Tools/GuideTool.cpp

+ 2 - 2
Userland/Applications/PixelPaint/Tools/GuideTool.cpp

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