1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

Spreadsheet: Display a detailed view of a cell error on hover

With this, Spreadsheet can now show an almost full stack trace for the
error (which is infintely better than just the error message).
This commit is contained in:
Ali Mohammad Pur 2022-06-26 00:12:23 +04:30 committed by Linus Groh
parent 64ef808aeb
commit db4a5aafc8
6 changed files with 62 additions and 1 deletions

View file

@ -77,6 +77,16 @@ void InfinitelyScrollableTableView::mousemove_event(GUI::MouseEvent& event)
sheet.disable_updates();
ScopeGuard sheet_update_enabler { [&] { sheet.enable_updates(); } };
if (!is_dragging()) {
auto tooltip = model->data(index, static_cast<GUI::ModelRole>(SheetModel::Role::Tooltip));
if (tooltip.is_string()) {
set_tooltip(tooltip.as_string());
show_or_hide_tooltip();
} else {
set_tooltip({});
}
}
m_is_hovering_cut_zone = false;
m_is_hovering_extend_zone = false;
if (selection().size() > 0 && !m_is_dragging_for_select) {