New user fixes.
This commit is contained in:
@@ -90,7 +90,7 @@ public class CollectionListModel<E> extends AbstractListModel<E>
|
||||
@Override
|
||||
@SuppressWarnings({ "unchecked", "SuspiciousMethodCalls" })
|
||||
public synchronized void setSelectedItem(@Nullable final Object newSelectedItem) {
|
||||
if (!Objects.equals( selectedItem, newSelectedItem ) && model.contains( newSelectedItem )) {
|
||||
if (!Objects.equals( selectedItem, newSelectedItem )) {
|
||||
selectedItem = (E) newSelectedItem;
|
||||
|
||||
fireContentsChanged( this, -1, -1 );
|
||||
|
@@ -431,8 +431,9 @@ public class UserContentPanel extends JPanel implements FilesPanel.Listener, MPU
|
||||
Toolkit.getDefaultToolkit().getSystemClipboard().setContents( clipboardContents, null );
|
||||
|
||||
Res.ui( () -> {
|
||||
Window window = SwingUtilities.windowForComponent( this );
|
||||
window.dispatchEvent( new WindowEvent( window, WindowEvent.WINDOW_CLOSING ) );
|
||||
Window window = SwingUtilities.windowForComponent( UserContentPanel.this );
|
||||
if (window != null)
|
||||
window.dispatchEvent( new WindowEvent( window, WindowEvent.WINDOW_CLOSING ) );
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
Reference in New Issue
Block a user