mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-25 09:18:51 -05:00
* ignore double click action if nothing is selected
This commit is contained in:
parent
23f747c18b
commit
b5cdd5fd63
@ -182,8 +182,10 @@ public class RenamePanel extends JComponent {
|
|||||||
getWindow(evt.getSource()).setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
getWindow(evt.getSource()).setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
try {
|
try {
|
||||||
JList list = (JList) evt.getSource();
|
JList list = (JList) evt.getSource();
|
||||||
|
if (list.getSelectedIndex() >= 0) {
|
||||||
File item = (File) list.getSelectedValue();
|
File item = (File) list.getSelectedValue();
|
||||||
Desktop.getDesktop().browse(item.getParentFile().toURI());
|
Desktop.getDesktop().browse(item.getParentFile().toURI());
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.getLogger(RenamePanel.class.getName()).log(Level.WARNING, e.getMessage());
|
Logger.getLogger(RenamePanel.class.getName()).log(Level.WARNING, e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
@ -201,6 +203,7 @@ public class RenamePanel extends JComponent {
|
|||||||
if (evt.getClickCount() == 2) {
|
if (evt.getClickCount() == 2) {
|
||||||
try {
|
try {
|
||||||
JList list = (JList) evt.getSource();
|
JList list = (JList) evt.getSource();
|
||||||
|
if (list.getSelectedIndex() >= 0) {
|
||||||
Object item = ((FormattedFuture) list.getSelectedValue()).getMatch().getValue();
|
Object item = ((FormattedFuture) list.getSelectedValue()).getMatch().getValue();
|
||||||
if (item instanceof Movie) {
|
if (item instanceof Movie) {
|
||||||
getWindow(evt.getSource()).setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
getWindow(evt.getSource()).setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
@ -211,6 +214,7 @@ public class RenamePanel extends JComponent {
|
|||||||
Desktop.getDesktop().browse(WebServices.IMDb.getMoviePageLink(m.getImdbId()));
|
Desktop.getDesktop().browse(WebServices.IMDb.getMoviePageLink(m.getImdbId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.getLogger(RenamePanel.class.getName()).log(Level.WARNING, e.getMessage());
|
Logger.getLogger(RenamePanel.class.getName()).log(Level.WARNING, e.getMessage());
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
Reference in New Issue
Block a user