PixelPaint: Don't deselect layers in LayerListWidget
There is really no reason to be able to deselect layers, so just ignore when the user clicks outside of a layer gadget.
This commit is contained in:
parent
95710b0147
commit
c59c970363
Notes:
sideshowbarker
2024-07-18 09:59:40 +09:00
Author: https://github.com/metmo Commit: https://github.com/SerenityOS/serenity/commit/c59c9703639 Pull-request: https://github.com/SerenityOS/serenity/pull/8583
1 changed files with 2 additions and 4 deletions
|
@ -134,11 +134,9 @@ void LayerListWidget::mousedown_event(GUI::MouseEvent& event)
|
|||
Gfx::IntPoint translated_event_point = { 0, vertical_scrollbar().value() + event.y() };
|
||||
|
||||
auto gadget_index = gadget_at(translated_event_point);
|
||||
if (!gadget_index.has_value()) {
|
||||
if (on_layer_select)
|
||||
on_layer_select(nullptr);
|
||||
if (!gadget_index.has_value())
|
||||
return;
|
||||
}
|
||||
|
||||
m_moving_gadget_index = gadget_index;
|
||||
m_selected_layer_index = gadget_index.value();
|
||||
m_moving_event_origin = translated_event_point;
|
||||
|
|
Loading…
Add table
Reference in a new issue