예제 #1
0
    void selectionChanged() override
    {
        // we're only really interested in when the selection changes, regardless of if it was
        // clicked or not so we'll only override this method
        const File selectedFile (fileTree.getSelectedFile());

        if (selectedFile.existsAsFile())
            imagePreview.setImage (ImageCache::getFromFile (selectedFile));

        // the image cahce is a handly way to load images from files or directly from memory and
        // will keep them hanging around for a few seconds in case they are requested elsewhere
    }
예제 #2
0
 void selectionChanged() override
 {
     showFile (fileTreeComp.getSelectedFile());
 }