Symmetric new selection (#1122)

* Move calls to update outside of each input case

* Remove redundant checks when moving selection

* Handle selection clipping the same for each mode

* Fix typo in SelectionWidget enum

* Obligatory "I forgot to clang-format" commit
This commit is contained in:
David Mitchell
2021-02-06 18:05:40 -08:00
committed by GitHub
parent aee943af5d
commit c63b161025
3 changed files with 34 additions and 41 deletions

View File

@@ -53,9 +53,9 @@ SelectionWidget::SideType SelectionWidget::getMouseSide(
} else if (m_TRArea.contains(point)) {
return TOPRIGHT_SIDE;
} else if (m_BLArea.contains(point)) {
return BOTTONLEFT_SIDE;
return BOTTOMLEFT_SIDE;
} else if (m_BRArea.contains(point)) {
return BOTTONRIGHT_SIDE;
return BOTTOMRIGHT_SIDE;
} else if (m_LArea.contains(point)) {
return LEFT_SIDE;
} else if (m_TArea.contains(point)) {
@@ -63,7 +63,7 @@ SelectionWidget::SideType SelectionWidget::getMouseSide(
} else if (m_RArea.contains(point)) {
return RIGHT_SIDE;
} else if (m_BArea.contains(point)) {
return BOTTON_SIDE;
return BOTTOM_SIDE;
} else {
return NO_SIDE;
}