1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:57:45 +00:00

Spreadsheet: Only append new columns/rows every 50ms

Fixes #5550.
This commit is contained in:
AnotherTest 2021-03-18 20:58:58 +03:30 committed by Andreas Kling
parent 7191098356
commit 9f8d518e82
2 changed files with 25 additions and 6 deletions

View file

@ -86,6 +86,11 @@ public:
Function<void()> on_reaching_horizontal_end;
private:
InfinitelyScrollableTableView()
: m_horizontal_scroll_end_timer(Core::Timer::construct())
, m_vertical_scroll_end_timer(Core::Timer::construct())
{
}
virtual void did_scroll() override;
virtual void mousemove_event(GUI::MouseEvent&) override;
virtual void mouseup_event(GUI::MouseEvent&) override;
@ -93,6 +98,8 @@ private:
bool m_should_intercept_drag { false };
bool m_has_committed_to_dragging { false };
GUI::ModelIndex m_starting_selection_index;
RefPtr<Core::Timer> m_horizontal_scroll_end_timer;
RefPtr<Core::Timer> m_vertical_scroll_end_timer;
};
class SpreadsheetView final : public GUI::Widget {