mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-17 07:50:04 +00:00
GTextEditor: Minor cleanup
Remove an unnecessary layer of nesting
This commit is contained in:
parent
f55965b5e8
commit
966c5d10b1
Notes:
sideshowbarker
2024-07-19 14:07:40 +09:00
Author: https://github.com/rburchell
Commit: 966c5d10b1
Pull-request: https://github.com/SerenityOS/serenity/pull/40
Reviewed-by: https://github.com/awesomekling
1 changed files with 24 additions and 23 deletions
|
@ -159,7 +159,10 @@ void GTextEditor::doubleclick_event(GMouseEvent& event)
|
||||||
|
|
||||||
void GTextEditor::mousedown_event(GMouseEvent& event)
|
void GTextEditor::mousedown_event(GMouseEvent& event)
|
||||||
{
|
{
|
||||||
if (event.button() == GMouseButton::Left) {
|
if (event.button() != GMouseButton::Left) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (event.modifiers() & Mod_Shift) {
|
if (event.modifiers() & Mod_Shift) {
|
||||||
if (!has_selection())
|
if (!has_selection())
|
||||||
m_selection.set(m_cursor, { });
|
m_selection.set(m_cursor, { });
|
||||||
|
@ -182,8 +185,6 @@ void GTextEditor::mousedown_event(GMouseEvent& event)
|
||||||
// FIXME: Only update the relevant rects.
|
// FIXME: Only update the relevant rects.
|
||||||
update();
|
update();
|
||||||
did_update_selection();
|
did_update_selection();
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GTextEditor::mouseup_event(GMouseEvent& event)
|
void GTextEditor::mouseup_event(GMouseEvent& event)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue