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 }
void selectionChanged() override { showFile (fileTreeComp.getSelectedFile()); }