Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
parg committed Dec 18, 2024
1 parent d1a41c0 commit 50089a3
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions uis/src/com/biglybt/ui/swt/views/skin/sidebar/SideBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -1671,8 +1671,14 @@ protected void defaultDrop(DropTargetEvent event) {
*
* @since 3.1.1.1
*/
protected void fillDropDownMenu(Menu menuDropDown, TreeItem[] items,
int indent) {
protected boolean
fillDropDownMenu(
Menu menuDropDown,
TreeItem[] items,
int indent)
{
boolean hit = false;

String s = "";
for (int i = 0; i < indent; i++) {
s += " ";
Expand All @@ -1698,11 +1704,16 @@ protected void fillDropDownMenu(Menu menuDropDown, TreeItem[] items,
//ind = "\t" + o;
}
}
menuItem.setText(s + entry.getTitle() + ind);
String title = s + entry.getTitle() + ind;

menuItem.setText( title );
menuItem.addSelectionListener(dropDownSelectionListener);
MdiEntry currentEntry = getSelectedEntry();

if (currentEntry != null && currentEntry.getViewID().equals(id)) {
menuItem.setSelection(true);

hit = true;
}

TreeItem[] subItems = treeItem.getItems();
Expand All @@ -1714,9 +1725,19 @@ protected void fillDropDownMenu(Menu menuDropDown, TreeItem[] items,
}


fillDropDownMenu(parent, subItems, indent + 1);
if ( fillDropDownMenu(parent, subItems, indent + 1)){

hit = true;

if ( !entry.isSelectable()){

menuItem.setText( title + " (*)");
}
};
}
}

return( hit );
}

/**
Expand Down

0 comments on commit 50089a3

Please sign in to comment.