Minor fix in UITableView and UITreeView keyboard navigation.

This commit is contained in:
Martín Lucas Golini
2022-03-11 17:58:57 -03:00
parent 7565831301
commit 746e44bf2b
3 changed files with 3 additions and 2 deletions

View File

@@ -683,6 +683,7 @@ enum KeyModTable {
#define KEYMOD_SHIFT ( KEYMOD_LSHIFT | KEYMOD_RSHIFT )
#define KEYMOD_ALT ( KEYMOD_LALT | KEYMOD_RALT )
#define KEYMOD_META ( KEYMOD_LMETA | KEYMOD_RMETA )
#define KEYMOD_CTRL_SHIFT_ALT_META ( KEYMOD_CTRL | KEYMOD_SHIFT | KEYMOD_ALT | KEYMOD_META )
/** @enum MouseButton Mouse buttons */
enum MouseButton {

View File

@@ -172,7 +172,7 @@ void UITableView::onColumnSizeChange( const size_t& colIndex, bool fromUserInter
}
Uint32 UITableView::onKeyDown( const KeyEvent& event ) {
if ( event.getMod() )
if ( event.getMod() & KEYMOD_CTRL_SHIFT_ALT_META )
return UIAbstractTableView::onKeyDown( event );
auto curIndex = getSelection().first();
int pageSize = eefloor( getVisibleArea().getHeight() / getRowHeight() ) - 1;

View File

@@ -453,7 +453,7 @@ void UITreeView::setExpanderIconSize( const size_t& expanderSize ) {
}
Uint32 UITreeView::onKeyDown( const KeyEvent& event ) {
if ( event.getMod() )
if ( event.getMod() & KEYMOD_CTRL_SHIFT_ALT_META )
return UIAbstractTableView::onKeyDown( event );
auto curIndex = getSelection().first();