Commit 7ecde3b8 authored by Davis King's avatar Davis King

Fixed a minor bug in the zoomable_region::set_min_zoom_scale() function.

It didn't always end up zooming in a smooth sensible manner after this
function was called.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403160
parent 276599fe
...@@ -2050,12 +2050,14 @@ namespace dlib ...@@ -2050,12 +2050,14 @@ namespace dlib
{ {
auto_mutex M(m); auto_mutex M(m);
min_scale = ms; min_scale = ms;
if (scale < ms) if (scale < ms)
{ {
scale = min_scale; scale = min_scale;
lr_point = gui_to_graph_space(point(display_rect_.right(),display_rect_.bottom()));
redraw_graph();
} }
// just call set_size so that everything gets redrawn right
set_size(rect.width(), rect.height());
} }
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
......
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