Cyberduck Mountain Duck CLI

Changeset 42098


Ignore:
Timestamp:
Jul 31, 2017 3:54:11 PM (11 months ago)
Author:
dkocher
Message:

Always obtain new reference to shared preview panel. Fix #7045.

Location:
shelves/07.2017
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shelves/07.2017/osx/src/main/java/ch/cyberduck/ui/cocoa/quicklook/QuartzQuickLook.java

    r40957 r42098  
    3636            = new ArrayList<QLPreviewItem>();
    3737
    38     private final QLPreviewPanel panel;
    39 
    40     public QuartzQuickLook() {
    41         panel = QLPreviewPanel.sharedPreviewPanel();
    42     }
    43 
    4438    @Override
    4539    public void select(final List<Local> files) {
     
    7468    @Override
    7569    public boolean isOpen() {
    76         return QLPreviewPanel.sharedPreviewPanelExists() && panel.isVisible();
     70        return QLPreviewPanel.sharedPreviewPanelExists()
     71                && QLPreviewPanel.sharedPreviewPanel().isVisible();
    7772    }
    7873
    7974    @Override
    8075    public void willBeginQuickLook() {
    81         panel.setDataSource(model.id());
     76        QLPreviewPanel.sharedPreviewPanel().setDataSource(model.id());
    8277    }
    8378
    8479    @Override
    8580    public void open() {
     81        final QLPreviewPanel panel = QLPreviewPanel.sharedPreviewPanel();
    8682        panel.makeKeyAndOrderFront(null);
    8783        if(null == panel.dataSource()) {
     
    9490    @Override
    9591    public void close() {
     92        final QLPreviewPanel panel = QLPreviewPanel.sharedPreviewPanel();
    9693        panel.setDataSource(null);
    9794        panel.orderOut(null);
Note: See TracChangeset for help on using the changeset viewer.
swiss made software