diff options
author | rabite <rabite@posteo.de> | 2019-02-13 10:08:29 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-02-13 10:08:29 +0100 |
commit | 205e9dc4265b9a9d7fdcd836e646830bf8e0ce30 (patch) | |
tree | 0e0cc4907fd912e05c77a58700ca42bf2998f181 /src/file_browser.rs | |
parent | 56d9c3521599baef6ff1472c0c95fa07f17a5a67 (diff) |
speed optimization
Diffstat (limited to 'src/file_browser.rs')
-rw-r--r-- | src/file_browser.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/file_browser.rs b/src/file_browser.rs index a499c5b..3a178b0 100644 --- a/src/file_browser.rs +++ b/src/file_browser.rs @@ -115,12 +115,8 @@ impl FileBrowser { pub fn update_preview(&mut self) { if self.columns.get_main_widget().content.len() == 0 { return } let file = self.columns.get_main_widget().selected_file().clone(); - //let preview = &mut self.columns.preview; - let coords = self.columns.preview.get_coordinates(); - let mut preview = crate::preview::AsyncPreviewer::new(); - preview.set_coordinates(&coords); + let preview = &mut self.columns.preview; preview.set_file(&file); - self.columns.preview = preview; } pub fn fix_selection(&mut self) { |