提交 409992ab 编写于 作者: S Serge Rider

Driver editor fix (delete multiple files)


Former-commit-id: 7ca2f9d8
上级 c00de857
......@@ -318,7 +318,7 @@ public class DriverEditDialog extends HelpEnabledDialog
libsListGroup.setLayout(layout);
// Additional libraries list
libTable = new TreeViewer(libsListGroup, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL);
libTable = new TreeViewer(libsListGroup, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
libTable.setContentProvider(new LibContentProvider());
libTable.setLabelProvider(new CellLabelProvider() {
@Override
......@@ -479,7 +479,14 @@ public class DriverEditDialog extends HelpEnabledDialog
@Override
public void widgetSelected(SelectionEvent e)
{
driver.removeDriverLibrary(getSelectedLibrary());
IStructuredSelection selection = (IStructuredSelection) libTable.getSelection();
if (selection != null && !selection.isEmpty()) {
for (Object obj : selection.toArray()) {
if (obj instanceof DriverLibraryAbstract) {
driver.removeDriverLibrary((DriverLibraryAbstract) obj);
}
}
}
changeLibContent();
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册