diff options
author | rabite <rabite@posteo.de> | 2019-02-05 15:56:58 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-02-05 15:59:36 +0100 |
commit | 89ffedad18f6a45874bf7ac98ba7a0ed69eb0685 (patch) | |
tree | 7fe53aca4399bf5e4bc72a91ce6f898488f9cb07 /src/miller_columns.rs | |
parent | d3746dacb2308523902501208bdca28965f2954a (diff) |
unnecessary animations
Diffstat (limited to 'src/miller_columns.rs')
-rw-r--r-- | src/miller_columns.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/miller_columns.rs b/src/miller_columns.rs index 2937ce8..c38efe6 100644 --- a/src/miller_columns.rs +++ b/src/miller_columns.rs @@ -46,7 +46,7 @@ where pub fn calculate_coordinates(&self) -> (Coordinates, Coordinates, Coordinates) { let xsize = self.coordinates.xsize(); let ysize = self.coordinates.ysize(); - let top = self.coordinates.top().x(); + let top = self.coordinates.top().y(); let ratio = self.ratio; let left_xsize = xsize * ratio.0 / 100; @@ -138,8 +138,9 @@ where left_widget.set_coordinates(&left_coords); } - let main_widget = self.get_main_widget_mut(); - main_widget.set_coordinates(&main_coords); + if let Some(main_widget) = self.widgets.widgets.last_mut() { + main_widget.set_coordinates(&main_coords); + } let preview_widget = &mut self.preview; preview_widget.set_coordinates(&preview_coords); |