[gnumeric] Cleanup.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Cleanup.
- Date: Sun, 6 Mar 2022 14:07:28 +0000 (UTC)
commit fd2f694ac858e16a5f918996155b39ecf32996ee
Author: Morten Welinder <terra gnome org>
Date: Sun Mar 6 09:07:02 2022 -0500
Cleanup.
src/colrow.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/colrow.c b/src/colrow.c
index 29747d56e..26a7414e2 100644
--- a/src/colrow.c
+++ b/src/colrow.c
@@ -61,8 +61,11 @@ col_row_info_get_type (void)
double
colrow_compute_pixel_scale (Sheet const *sheet, gboolean horizontal)
{
- return (sheet ? sheet->last_zoom_factor_used : 1.0) *
- gnm_app_display_dpi_get (horizontal) / 72.;
+ double scale = gnm_app_display_dpi_get (horizontal) / 72.0;
+ if (sheet) {
+ scale *= sheet->last_zoom_factor_used;
+ }
+ return scale;
}
void
@@ -71,6 +74,9 @@ colrow_compute_pixels_from_pts (ColRowInfo *cri, Sheet const *sheet,
{
int const margin = horizontal ? 2*GNM_COL_MARGIN : 2*GNM_ROW_MARGIN;
+ if (!sheet)
+ g_error ("Why is sheet NULL here?\n");
+
if (scale == -1)
scale = colrow_compute_pixel_scale (sheet, horizontal);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]