mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 06:33:57 -06:00
Fix several warnings
This commit is contained in:
parent
40877b12f7
commit
677cb58000
5 changed files with 5 additions and 6 deletions
|
@ -1505,7 +1505,7 @@ double ModelObject::get_instance_min_z(size_t instance_idx) const
|
||||||
|
|
||||||
const Transform3d mv = mi * v->get_matrix();
|
const Transform3d mv = mi * v->get_matrix();
|
||||||
const TriangleMesh& hull = v->get_convex_hull();
|
const TriangleMesh& hull = v->get_convex_hull();
|
||||||
for (const stl_triangle_vertex_indices facet : hull.its.indices)
|
for (const stl_triangle_vertex_indices& facet : hull.its.indices)
|
||||||
for (int i = 0; i < 3; ++ i)
|
for (int i = 0; i < 3; ++ i)
|
||||||
min_z = std::min(min_z, (mv * hull.its.vertices[facet[i]].cast<double>()).z());
|
min_z = std::min(min_z, (mv * hull.its.vertices[facet[i]].cast<double>()).z());
|
||||||
}
|
}
|
||||||
|
@ -1526,7 +1526,7 @@ double ModelObject::get_instance_max_z(size_t instance_idx) const
|
||||||
|
|
||||||
const Transform3d mv = mi * v->get_matrix();
|
const Transform3d mv = mi * v->get_matrix();
|
||||||
const TriangleMesh& hull = v->get_convex_hull();
|
const TriangleMesh& hull = v->get_convex_hull();
|
||||||
for (const stl_triangle_vertex_indices facet : hull.its.indices)
|
for (const stl_triangle_vertex_indices& facet : hull.its.indices)
|
||||||
for (int i = 0; i < 3; ++i)
|
for (int i = 0; i < 3; ++i)
|
||||||
max_z = std::max(max_z, (mv * hull.its.vertices[facet[i]].cast<double>()).z());
|
max_z = std::max(max_z, (mv * hull.its.vertices[facet[i]].cast<double>()).z());
|
||||||
}
|
}
|
||||||
|
|
|
@ -977,7 +977,7 @@ void Choice::BUILD() {
|
||||||
propagate_value();
|
propagate_value();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
temp->Bind(wxEVT_TEXT_ENTER, [this, temp](wxEvent& e) {
|
temp->Bind(wxEVT_TEXT_ENTER, [this](wxEvent& e) {
|
||||||
EnterPressed enter(this);
|
EnterPressed enter(this);
|
||||||
propagate_value();
|
propagate_value();
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -881,7 +881,7 @@ CommonGizmosDataID GLGizmoSlaSupports::on_get_requirements() const
|
||||||
|
|
||||||
void GLGizmoSlaSupports::ask_about_changes_call_after(std::function<void()> on_yes, std::function<void()> on_no)
|
void GLGizmoSlaSupports::ask_about_changes_call_after(std::function<void()> on_yes, std::function<void()> on_no)
|
||||||
{
|
{
|
||||||
wxGetApp().CallAfter([this, on_yes, on_no]() {
|
wxGetApp().CallAfter([on_yes, on_no]() {
|
||||||
// Following is called through CallAfter, because otherwise there was a problem
|
// Following is called through CallAfter, because otherwise there was a problem
|
||||||
// on OSX with the wxMessageDialog being shown several times when clicked into.
|
// on OSX with the wxMessageDialog being shown several times when clicked into.
|
||||||
MessageDialog dlg(GUI::wxGetApp().mainframe, _L("Do you want to save your manually "
|
MessageDialog dlg(GUI::wxGetApp().mainframe, _L("Do you want to save your manually "
|
||||||
|
|
|
@ -37,7 +37,6 @@ void ObjectDataViewModelNode::init_container()
|
||||||
static constexpr char LayerRootIcon[] = "edit_layers_all";
|
static constexpr char LayerRootIcon[] = "edit_layers_all";
|
||||||
static constexpr char LayerIcon[] = "edit_layers_some";
|
static constexpr char LayerIcon[] = "edit_layers_some";
|
||||||
static constexpr char WarningIcon[] = "exclamation";
|
static constexpr char WarningIcon[] = "exclamation";
|
||||||
static constexpr char InfoIcon[] = "objlist_info";
|
|
||||||
|
|
||||||
struct InfoItemAtributes {
|
struct InfoItemAtributes {
|
||||||
std::string name;
|
std::string name;
|
||||||
|
|
|
@ -3691,7 +3691,7 @@ void Plater::priv::create_simplify_notification(const std::vector<size_t>& obj_i
|
||||||
std::vector<size_t> big_ids;
|
std::vector<size_t> big_ids;
|
||||||
big_ids.reserve(obj_ids.size());
|
big_ids.reserve(obj_ids.size());
|
||||||
std::copy_if(obj_ids.begin(), obj_ids.end(), std::back_inserter(big_ids),
|
std::copy_if(obj_ids.begin(), obj_ids.end(), std::back_inserter(big_ids),
|
||||||
[this, triangles_to_suggest_simplify](size_t object_id) {
|
[this](size_t object_id) {
|
||||||
if (object_id >= model.objects.size()) return false; // out of object index
|
if (object_id >= model.objects.size()) return false; // out of object index
|
||||||
ModelVolumePtrs& volumes = model.objects[object_id]->volumes;
|
ModelVolumePtrs& volumes = model.objects[object_id]->volumes;
|
||||||
if (volumes.size() != 1) return false; // not only one volume
|
if (volumes.size() != 1) return false; // not only one volume
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue