This commit is contained in:
bubnikv 2019-03-14 12:10:37 +01:00
commit 6f2695366e
4 changed files with 11 additions and 7 deletions

View file

@ -405,7 +405,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("bottom_fill_pattern", coEnum);
*def = *def_top_fill_pattern;
def->label = L("Bottom Pattern");
def->label = L("Bottom fill pattern");
def->tooltip = L("Fill pattern for bottom infill. This only affects the bottom external visible layer, and not its adjacent solid shells.");
def->cli = "bottom-fill-pattern|external-fill-pattern|solid-fill-pattern";
def->default_value = new ConfigOptionEnum<InfillPattern>(ipRectilinear);

View file

@ -1411,10 +1411,11 @@ public:
using libnest2d::opt::GeneticOptimizer;
using libnest2d::opt::StopCriteria;
for(unsigned i = 0, fidx = filtered_indices[0];
i < filtered_indices.size(); ++i, fidx = filtered_indices[i])
for(unsigned i = 0, fidx = 0; i < filtered_indices.size(); ++i)
{
m_thr();
fidx = filtered_indices[i];
auto n = nmls.row(i);
// for all normals we generate the spherical coordinates and

View file

@ -655,9 +655,7 @@ void ObjectList::get_options_menu(settings_menu_hierarchy& settings_menu, const
if (category.empty() ||
(category == "Extruders" && extruders_cnt == 1)) continue;
const std::string& label = opt->label.empty() ? opt->full_label :
opt->full_label.empty() ? opt->label :
opt->full_label + " " + opt->label;;
const std::string& label = !opt->full_label.empty() ? opt->full_label : opt->label;
std::pair<std::string, std::string> option_label(option, label);
std::vector< std::pair<std::string, std::string> > new_category;
auto& cat_opt_label = settings_menu.find(category) == settings_menu.end() ? new_category : settings_menu.at(category);
@ -1763,7 +1761,8 @@ void ObjectList::delete_from_model_and_list(const std::vector<ItemForDelete>& it
if (item->type&itVolume)
{
m_objects_model->Delete(m_objects_model->GetItemByVolumeId(item->obj_idx, item->sub_obj_idx));
if ((*m_objects)[item->obj_idx]->volumes.size() == 1)
if ((*m_objects)[item->obj_idx]->volumes.size() == 1 &&
(*m_objects)[item->obj_idx]->config.has("extruder"))
{
const wxString extruder = wxString::Format("%d", (*m_objects)[item->obj_idx]->config.option<ConfigOptionInt>("extruder")->value);
m_objects_model->SetValue(extruder, m_objects_model->GetItemById(item->obj_idx), 1);

View file

@ -816,6 +816,10 @@ void Tab::update_wiping_button_visibility() {
// to update number of "filament" selection boxes when the number of extruders change.
void Tab::on_presets_changed()
{
if (wxGetApp().plater() == nullptr) {
return;
}
// Instead of PostEvent (EVT_TAB_PRESETS_CHANGED) just call update_presets
wxGetApp().plater()->sidebar().update_presets(m_type);
update_preset_description_line();