mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 05:22:00 +08:00
Some minor fixes. #3603
This commit is contained in:
parent
49a9492ad2
commit
475f9d45a5
@ -304,7 +304,7 @@ sub mouse_event {
|
||||
$self->_dragged(undef);
|
||||
} elsif ($e->Moving) {
|
||||
$self->_mouse_pos($pos);
|
||||
$self->Refresh;
|
||||
$self->Refresh if $self->enable_picking;
|
||||
} else {
|
||||
$e->Skip();
|
||||
}
|
||||
@ -976,6 +976,9 @@ sub Render {
|
||||
glFlush();
|
||||
|
||||
$self->SwapBuffers();
|
||||
|
||||
# Calling glFinish has a performance penalty, but it seems to fix some OpenGL driver hang-up with extremely large scenes.
|
||||
glFinish();
|
||||
}
|
||||
|
||||
sub draw_axes {
|
||||
|
@ -41,7 +41,7 @@ FillRectilinear::_fill_single_direction(ExPolygon expolygon,
|
||||
// extend bounding box so that our pattern will be aligned with other layers
|
||||
// Transform the reference point to the rotated coordinate system.
|
||||
Point p = direction.second.rotated(-direction.first);
|
||||
p.x -= x_shift > 0 ? x_shift : (x_shift + line_spacing);
|
||||
p.x -= x_shift >= 0 ? x_shift : (x_shift + line_spacing);
|
||||
bounding_box.min.align_to_grid(
|
||||
Point(line_spacing, line_spacing),
|
||||
p
|
||||
|
@ -94,7 +94,7 @@ parallelize(std::queue<T> queue, boost::function<void(T)> func,
|
||||
if (threads_count == 0) threads_count = 2;
|
||||
boost::mutex queue_mutex;
|
||||
boost::thread_group workers;
|
||||
for (int i = 0; i < fminf(threads_count, queue.size()); i++)
|
||||
for (int i = 0; i < std::min(threads_count, (int)queue.size()); i++)
|
||||
workers.add_thread(new boost::thread(&_parallelize_do<T>, &queue, &queue_mutex, func));
|
||||
workers.join_all();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user