Commit 2c5db30f authored by Fabrice Salvaire's avatar Fabrice Salvaire

QtPainter: fixed margin for fit scene

parent 5cf51a65
......@@ -549,7 +549,9 @@ class ViewportArea:
# scale = min(width_scale, height_scale)
# scale [px/mm]
axis_scale = self._viewport_size / self._to_np_array(self.scene_area.size)
# Add 2% to scene for margin
margin_scale = 1 + 2 / 100
axis_scale = self._viewport_size / (self._to_np_array(self.scene_area.size) * margin_scale)
axis = axis_scale.argmin()
scale = axis_scale[axis]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment