Skip to content

Commit

Permalink
Fix arrow navigation in TreeWidget
Browse files Browse the repository at this point in the history
Closes FreeCAD#10488. This commit removes the code fragment that "swallowed"
the key press events.
  • Loading branch information
xtemp09 authored and chennes committed Jan 24, 2025
1 parent 9ae7491 commit c7620fd
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/Gui/Tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1682,22 +1682,7 @@ void TreeWidget::keyPressEvent(QKeyEvent* event)
return;
}
}
else if (event->key() == Qt::Key_Left) {
auto index = currentIndex();
if (index.column() == 1) {
setCurrentIndex(model()->index(index.row(), 0, index.parent()));
event->accept();
return;
}
}
else if (event->key() == Qt::Key_Right) {
auto index = currentIndex();
if (index.column() == 0) {
setCurrentIndex(model()->index(index.row(), 1, index.parent()));
event->accept();
return;
}
}

QTreeWidget::keyPressEvent(event);
}

Expand Down

0 comments on commit c7620fd

Please sign in to comment.