Merge branch 'dev' of https://github.com/prusa3d/PrusaSlicer into dev
This commit is contained in:
commit
89ebf1f1e8
3 changed files with 10 additions and 13 deletions
|
@ -1236,7 +1236,8 @@ std::string Print::validate() const
|
||||||
|
|
||||||
// The comparison of the profiles is not just about element-wise equality, some layers may not be
|
// The comparison of the profiles is not just about element-wise equality, some layers may not be
|
||||||
// explicitely included. Always remember z and height of last reference layer that in the vector
|
// explicitely included. Always remember z and height of last reference layer that in the vector
|
||||||
// and compare to that.
|
// and compare to that. In case some layers are in the vectors multiple times, only the last entry is
|
||||||
|
// taken into account and compared.
|
||||||
size_t i = 0; // index into tested profile
|
size_t i = 0; // index into tested profile
|
||||||
size_t j = 0; // index into reference profile
|
size_t j = 0; // index into reference profile
|
||||||
coordf_t ref_z = -1.;
|
coordf_t ref_z = -1.;
|
||||||
|
@ -1244,8 +1245,12 @@ std::string Print::validate() const
|
||||||
coordf_t ref_height = -1.;
|
coordf_t ref_height = -1.;
|
||||||
while (i < layer_height_profile.size()) {
|
while (i < layer_height_profile.size()) {
|
||||||
coordf_t this_z = layer_height_profile[i];
|
coordf_t this_z = layer_height_profile[i];
|
||||||
|
// find the last entry with this z
|
||||||
|
while (i+2 < layer_height_profile.size() && layer_height_profile[i+2] == this_z)
|
||||||
|
i += 2;
|
||||||
|
|
||||||
coordf_t this_height = layer_height_profile[i+1];
|
coordf_t this_height = layer_height_profile[i+1];
|
||||||
if (next_ref_z < this_z + EPSILON) {
|
if (ref_height < -1. || next_ref_z < this_z + EPSILON) {
|
||||||
ref_z = next_ref_z;
|
ref_z = next_ref_z;
|
||||||
do { // one layer can be in the vector several times
|
do { // one layer can be in the vector several times
|
||||||
ref_height = layer_height_profile_tallest[j+1];
|
ref_height = layer_height_profile_tallest[j+1];
|
||||||
|
|
|
@ -3012,22 +3012,15 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||||
wxGetApp().obj_manipul()->set_dirty();
|
wxGetApp().obj_manipul()->set_dirty();
|
||||||
// forces a frame render to update the view before the context menu is shown
|
// forces a frame render to update the view before the context menu is shown
|
||||||
render();
|
render();
|
||||||
/* #et_FIXME
|
}
|
||||||
Vec2d logical_pos = pos.cast<double>();
|
}
|
||||||
#if ENABLE_RETINA_GL
|
|
||||||
const float factor = m_retina_helper->get_scale_factor();
|
|
||||||
logical_pos = logical_pos.cwiseQuotient(Vec2d(factor, factor));
|
|
||||||
#endif // ENABLE_RETINA_GL
|
|
||||||
post_event(Vec2dEvent(EVT_GLCANVAS_RIGHT_CLICK, logical_pos));
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// #et_FIXME
|
|
||||||
Vec2d logical_pos = pos.cast<double>();
|
Vec2d logical_pos = pos.cast<double>();
|
||||||
#if ENABLE_RETINA_GL
|
#if ENABLE_RETINA_GL
|
||||||
const float factor = m_retina_helper->get_scale_factor();
|
const float factor = m_retina_helper->get_scale_factor();
|
||||||
logical_pos = logical_pos.cwiseQuotient(Vec2d(factor, factor));
|
logical_pos = logical_pos.cwiseQuotient(Vec2d(factor, factor));
|
||||||
#endif // ENABLE_RETINA_GL
|
#endif // ENABLE_RETINA_GL
|
||||||
|
if (!m_mouse.dragging)
|
||||||
|
// do not post the event if the user is panning the scene
|
||||||
post_event(RBtnEvent(EVT_GLCANVAS_RIGHT_CLICK, { logical_pos, m_hover_volume_idxs.empty() }));
|
post_event(RBtnEvent(EVT_GLCANVAS_RIGHT_CLICK, { logical_pos, m_hover_volume_idxs.empty() }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,6 @@ public:
|
||||||
wxDECLARE_EVENT(EVT_GLCANVAS_OBJECT_SELECT, SimpleEvent);
|
wxDECLARE_EVENT(EVT_GLCANVAS_OBJECT_SELECT, SimpleEvent);
|
||||||
|
|
||||||
using Vec2dEvent = Event<Vec2d>;
|
using Vec2dEvent = Event<Vec2d>;
|
||||||
// #et_FIXME : RBtnEvent is used instead of Vec2dEvent on EVT_GLCANVAS_RIGHT_CLICK
|
|
||||||
// _bool_ value is used as a indicator of selection in the 3DScene
|
// _bool_ value is used as a indicator of selection in the 3DScene
|
||||||
using RBtnEvent = Event<std::pair<Vec2d, bool>>;
|
using RBtnEvent = Event<std::pair<Vec2d, bool>>;
|
||||||
template <size_t N> using Vec2dsEvent = ArrayEvent<Vec2d, N>;
|
template <size_t N> using Vec2dsEvent = ArrayEvent<Vec2d, N>;
|
||||||
|
|
Loading…
Reference in a new issue