Commit 562e8758 authored by Davis King's avatar Davis King

Fixed a minor bug in how the zoomable_region widget

drew itself after a resize in some cases.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402667
parent 7239be49
......@@ -2071,15 +2071,16 @@ namespace dlib
parent.invalidate_rectangle(rect+old);
const double old_scale = scale;
const vector<double> old_gr_orig(gr_orig);
scale = min_scale;
gr_orig = vector<double>(0,0,0);
lr_point = gui_to_graph_space(point(display_rect_.right(),display_rect_.bottom()));
scale = old_scale;
// call adjust_origin() so that the scroll bars get their max slider positions
// setup right
const point rect_corner(display_rect_.left(), display_rect_.top());
const vector<double> rect_corner_graph(gui_to_graph_space(rect_corner));
adjust_origin(rect_corner, rect_corner_graph);
adjust_origin(rect_corner, old_gr_orig);
}
// ----------------------------------------------------------------------------------------
......
......@@ -2251,7 +2251,7 @@ namespace dlib
rectangle display_rect_;
bool mouse_drag_screen; // true if the user is dragging the white background area
point drag_screen_point; // the starting point the mouse was at in graph space for the background area drag
vector<double> drag_screen_point; // the starting point the mouse was at in graph space for the background area drag
scroll_bar vsb;
scroll_bar hsb;
......
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