Qt: fix game list event filter

Fixes a regression caused by copy pasting the list construction to its
own constructor.
This commit is contained in:
Megamouse 2023-05-08 22:28:05 +02:00
parent d13c0ee393
commit 315d9c308b
2 changed files with 4 additions and 4 deletions

View File

@ -95,6 +95,8 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> gui_settings, std
m_game_grid->scroll_area()->verticalScrollBar()->installEventFilter(this);
m_game_list = new game_list_table(this, m_persistent_settings);
m_game_list->installEventFilter(this);
m_game_list->verticalScrollBar()->installEventFilter(this);
m_game_compat = new game_compatibility(m_gui_settings, this);

View File

@ -28,7 +28,6 @@ game_list_table::game_list_table(game_list_frame* frame, std::shared_ptr<persist
setSelectionMode(QAbstractItemView::SingleSelection);
setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
verticalScrollBar()->installEventFilter(this);
verticalScrollBar()->setSingleStep(20);
horizontalScrollBar()->setSingleStep(20);
verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
@ -41,7 +40,6 @@ game_list_table::game_list_table(game_list_frame* frame, std::shared_ptr<persist
horizontalHeader()->setDefaultAlignment(Qt::AlignLeft);
setContextMenuPolicy(Qt::CustomContextMenu);
setAlternatingRowColors(true);
installEventFilter(this);
setColumnCount(gui::column_count);
setMouseTracking(true);