mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
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
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() };
|
Gfx::IntPoint translated_event_point = { 0, vertical_scrollbar().value() + event.y() };
|
||||||
|
|
||||||
auto gadget_index = gadget_at(translated_event_point);
|
auto gadget_index = gadget_at(translated_event_point);
|
||||||
if (!gadget_index.has_value()) {
|
if (!gadget_index.has_value())
|
||||||
if (on_layer_select)
|
|
||||||
on_layer_select(nullptr);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
m_moving_gadget_index = gadget_index;
|
m_moving_gadget_index = gadget_index;
|
||||||
m_selected_layer_index = gadget_index.value();
|
m_selected_layer_index = gadget_index.value();
|
||||||
m_moving_event_origin = translated_event_point;
|
m_moving_event_origin = translated_event_point;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue