Skip to content

Commit

Permalink
Fix outline selection oddity (fixes #350) (#355)
Browse files Browse the repository at this point in the history
Fix outline selection oddity (fixes #350)
Also for for ProjectBrowser which suffered from the same issue.

Call BOutlineListView::MouseDown() in every case.
  • Loading branch information
jackburton79 authored Apr 22, 2024
1 parent 2bd2c8d commit 3c678d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
12 changes: 3 additions & 9 deletions src/ui/FunctionsOutlineView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,9 @@ class SymbolOutlineListView: public BOutlineListView {
if (message != NULL)
message->FindInt32("buttons", &buttons);

if (buttons == B_MOUSE_BUTTON(1)) {
return BOutlineListView::MouseDown(where);
} else if ( buttons == B_MOUSE_BUTTON(2)) {
int32 index = IndexOf(where);
if (index >= 0) {
Select(index);
_ShowPopupMenu(where);
}
}
BOutlineListView::MouseDown(where);
if (buttons == B_MOUSE_BUTTON(2))
_ShowPopupMenu(where);
}

protected:
Expand Down
13 changes: 3 additions & 10 deletions src/ui/ProjectsFolderBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,20 +628,13 @@ void
ProjectsFolderBrowser::MouseDown(BPoint where)
{
int32 buttons = -1;

BMessage* message = Looper()->CurrentMessage();
if (message != NULL)
message->FindInt32("buttons", &buttons);

if (buttons == B_MOUSE_BUTTON(1)) {
BOutlineListView::MouseDown(where);
} else if ( buttons == B_MOUSE_BUTTON(2)) {
int32 index = IndexOf(where);
if (index >= 0) {
Select(index);
_ShowProjectItemPopupMenu(where);
}
}
BOutlineListView::MouseDown(where);
if ( buttons == B_MOUSE_BUTTON(2))
_ShowProjectItemPopupMenu(where);
}


Expand Down

0 comments on commit 3c678d2

Please sign in to comment.