|
@@ -383,9 +383,7 @@ void GAbstractColumnView::keydown_event(GKeyEvent& event)
|
|
|
return;
|
|
|
auto& model = *this->model();
|
|
|
if (event.key() == KeyCode::Key_Return) {
|
|
|
- selection().for_each_index([this](auto& index) {
|
|
|
- activate(index);
|
|
|
- });
|
|
|
+ activate_selected();
|
|
|
return;
|
|
|
}
|
|
|
if (event.key() == KeyCode::Key_Up) {
|
|
@@ -457,13 +455,10 @@ void GAbstractColumnView::doubleclick_event(GMouseEvent& event)
|
|
|
if (event.y() < header_height())
|
|
|
return;
|
|
|
if (!selection().is_empty()) {
|
|
|
- if (is_editable()) {
|
|
|
+ if (is_editable())
|
|
|
begin_editing(selection().first());
|
|
|
- } else {
|
|
|
- selection().for_each_index([this](auto& index) {
|
|
|
- activate(index);
|
|
|
- });
|
|
|
- }
|
|
|
+ else
|
|
|
+ activate_selected();
|
|
|
}
|
|
|
}
|
|
|
}
|