GTableView: Ignore right clicks for now.

This commit is contained in:
Andreas Kling 2019-03-06 19:44:18 +01:00
parent f3341d2ae7
commit 09ecef6299
Notes: sideshowbarker 2024-07-19 15:09:51 +09:00

View file

@ -92,8 +92,8 @@ void GTableView::mousedown_event(GMouseEvent& event)
return;
}
auto adjusted_position = event.position().translated(0, m_vertical_scrollbar->value());
if (event.button() == GMouseButton::Left) {
auto adjusted_position = event.position().translated(0, m_vertical_scrollbar->value());
for (int i = 0; i < item_count(); ++i) {
if (row_rect(i).contains(adjusted_position)) {
m_model->set_selected_index({ i, 0 });
@ -101,9 +101,9 @@ void GTableView::mousedown_event(GMouseEvent& event)
return;
}
}
m_model->set_selected_index({ });
update();
}
m_model->set_selected_index({ });
update();
}
void GTableView::paint_event(GPaintEvent& event)