mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 00:15:08 +00:00
LibGUI: Remove GModel activations to GAbstractView.
Now you can hook activation via GAbstractView::on_activation. The design still isn't quite right, we should eventually move the selection away from the model somehow.
This commit is contained in:
parent
bffaa5ece6
commit
fa232ac180
25 changed files with 107 additions and 104 deletions
|
@ -90,7 +90,7 @@ void GItemView::doubleclick_event(GMouseEvent& event)
|
|||
return;
|
||||
if (event.button() == GMouseButton::Left) {
|
||||
mousedown_event(event);
|
||||
model()->activate(model()->selected_index());
|
||||
activate(model()->selected_index());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ void GItemView::keydown_event(GKeyEvent& event)
|
|||
|
||||
auto& model = *this->model();
|
||||
if (event.key() == KeyCode::Key_Return) {
|
||||
model.activate(model.selected_index());
|
||||
activate(model.selected_index());
|
||||
return;
|
||||
}
|
||||
if (event.key() == KeyCode::Key_Home) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue