Fix of some warnings

This commit is contained in:
YuSanka 2021-05-18 12:58:14 +02:00
parent 6c47b15834
commit 1256aebd88
3 changed files with 5 additions and 4 deletions

View File

@ -2327,6 +2327,7 @@ void ObjectList::update_info_items(size_t obj_idx)
should_show = printer_technology() == ptFFF
&& ! model_object->layer_height_profile.empty();
break;
default: break;
}
if (! shows && should_show) {
@ -2509,8 +2510,8 @@ void ObjectList::select_object_item(bool is_msr_gizmo)
{
if (wxDataViewItem item = GetSelection()) {
ItemType type = m_objects_model->GetItemType(item);
bool is_volume_item = type == itVolume || type == itSettings && m_objects_model->GetItemType(m_objects_model->GetParent(item)) == itVolume;
if (is_msr_gizmo && is_volume_item || type == itObject)
bool is_volume_item = type == itVolume || (type == itSettings && m_objects_model->GetItemType(m_objects_model->GetParent(item)) == itVolume);
if ((is_msr_gizmo && is_volume_item) || type == itObject)
return;
if (wxDataViewItem obj_item = m_objects_model->GetTopParent(item)) {

View File

@ -675,7 +675,7 @@ void Preview::update_layers_slider(const std::vector<double>& layers_z, bool kee
if (cur_area != bottom_area && fabs(cur_area - bottom_area) > scale_(scale_(1)))
break;
}
if (i < size_t(0.3 * num_layers))
if (i < int(0.3 * num_layers))
continue;
// bottom layer have to be a biggest, so control relation between bottom layer and object size

View File

@ -545,7 +545,7 @@ void MainFrame::init_tabpanel()
m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) {
#if ENABLE_VALIDATE_CUSTOM_GCODE
if (int old_selection = e.GetOldSelection();
old_selection != wxNOT_FOUND && old_selection < m_tabpanel->GetPageCount()) {
old_selection != wxNOT_FOUND && old_selection < static_cast<int>(m_tabpanel->GetPageCount())) {
Tab* old_tab = dynamic_cast<Tab*>(m_tabpanel->GetPage(old_selection));
if (old_tab)
old_tab->validate_custom_gcodes();