mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-24 11:11:51 +00:00
LibGUI+HackStudio: Fix cursor appearance and crash while debugging
HackStudio uses a TreeView to display the list of current variables while debugging, and when the program completes, it sets that view's model to a null model. This would trip an assertion if the TreeView had something selected at the time, so this patch lessens the assertion into a simple null check. Additionally, the cursor would look laggy when moving about the editor because the code was waiting for a window repaint to update the cursor's look when it makes more sense to update the cursor when it actually moves. This change also requires the base GUI::TextEditor to expose a getter to tell if its currently in a drag selection. Finally, requesting a context menu in the line ruler on the side of the editor would also place/remove breakpoints, which was counter intuitive, so this requires a left click to modify breakpoint placement.
This commit is contained in:
parent
77039e5354
commit
12fe546be9
Notes:
sideshowbarker
2024-07-19 05:58:40 +09:00
Author: https://github.com/FalseHonesty
Commit: 12fe546be9
Pull-request: https://github.com/SerenityOS/serenity/pull/2453
4 changed files with 12 additions and 11 deletions
|
@ -377,7 +377,8 @@ void TreeView::did_update_model(unsigned flags)
|
|||
void TreeView::did_update_selection()
|
||||
{
|
||||
AbstractView::did_update_selection();
|
||||
ASSERT(model());
|
||||
if (!model())
|
||||
return;
|
||||
auto index = selection().first();
|
||||
if (!index.is_valid())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue