mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 04:31:58 +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);
|
$self->_dragged(undef);
|
||||||
} elsif ($e->Moving) {
|
} elsif ($e->Moving) {
|
||||||
$self->_mouse_pos($pos);
|
$self->_mouse_pos($pos);
|
||||||
$self->Refresh;
|
$self->Refresh if $self->enable_picking;
|
||||||
} else {
|
} else {
|
||||||
$e->Skip();
|
$e->Skip();
|
||||||
}
|
}
|
||||||
@ -976,6 +976,9 @@ sub Render {
|
|||||||
glFlush();
|
glFlush();
|
||||||
|
|
||||||
$self->SwapBuffers();
|
$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 {
|
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
|
// extend bounding box so that our pattern will be aligned with other layers
|
||||||
// Transform the reference point to the rotated coordinate system.
|
// Transform the reference point to the rotated coordinate system.
|
||||||
Point p = direction.second.rotated(-direction.first);
|
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(
|
bounding_box.min.align_to_grid(
|
||||||
Point(line_spacing, line_spacing),
|
Point(line_spacing, line_spacing),
|
||||||
p
|
p
|
||||||
|
@ -94,7 +94,7 @@ parallelize(std::queue<T> queue, boost::function<void(T)> func,
|
|||||||
if (threads_count == 0) threads_count = 2;
|
if (threads_count == 0) threads_count = 2;
|
||||||
boost::mutex queue_mutex;
|
boost::mutex queue_mutex;
|
||||||
boost::thread_group workers;
|
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.add_thread(new boost::thread(&_parallelize_do<T>, &queue, &queue_mutex, func));
|
||||||
workers.join_all();
|
workers.join_all();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user