Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_viewer

This commit is contained in:
enricoturri1966 2020-08-14 11:45:54 +02:00
commit 6a603eed25
13 changed files with 212 additions and 144 deletions

View file

@ -715,7 +715,7 @@ void PlaterPresetComboBox::update()
std::map<wxString, wxBitmap*> nonsys_presets;
wxString selected = "";
wxString selected_user_preset = "";
wxString tooltip = "";
const std::deque<Preset>& presets = m_collection->get_presets();
@ -742,7 +742,7 @@ void PlaterPresetComboBox::update()
{
// Assign an extruder color to the selected item if the extruder color is defined.
filament_rgb = preset.config.opt_string("filament_colour", 0);
extruder_rgb = (selected && !extruder_color.empty()) ? extruder_color : filament_rgb;
extruder_rgb = (is_selected && !extruder_color.empty()) ? extruder_color : filament_rgb;
single_bar = filament_rgb == extruder_rgb;
bitmap_key += single_bar ? filament_rgb : filament_rgb + extruder_rgb;
@ -764,7 +764,7 @@ void PlaterPresetComboBox::update()
{
nonsys_presets.emplace(wxString::FromUTF8((name + (preset.is_dirty ? Preset::suffix_modified() : "")).c_str()), bmp);
if (is_selected) {
selected = wxString::FromUTF8((name + (preset.is_dirty ? Preset::suffix_modified() : "")).c_str());
selected_user_preset = wxString::FromUTF8((name + (preset.is_dirty ? Preset::suffix_modified() : "")).c_str());
tooltip = wxString::FromUTF8(preset.name.c_str());
}
}
@ -776,7 +776,7 @@ void PlaterPresetComboBox::update()
set_label_marker(Append(separator(L("User presets")), wxNullBitmap));
for (std::map<wxString, wxBitmap*>::iterator it = nonsys_presets.begin(); it != nonsys_presets.end(); ++it) {
Append(it->first, *it->second);
validate_selection(it->first == selected);
validate_selection(it->first == selected_user_preset);
}
}
@ -1166,7 +1166,13 @@ void SavePresetDialog::Item::accept()
SavePresetDialog::SavePresetDialog(Preset::Type type, const std::string& suffix)
: DPIDialog(nullptr, wxID_ANY, _L("Save preset"), wxDefaultPosition, wxSize(45 * wxGetApp().em_unit(), 5 * wxGetApp().em_unit()), wxDEFAULT_DIALOG_STYLE | wxICON_WARNING | wxRESIZE_BORDER)
{
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
#if ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
// ys_FIXME! temporary workaround for correct font scaling
// Because of from wxWidgets 3.1.3 auto rescaling is implemented for the Fonts,
// From the very beginning set dialog font to the wxSYS_DEFAULT_GUI_FONT
this->SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
#endif // ENABLE_WX_3_1_3_DPI_CHANGED_EVENT
wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL);

View file

@ -3971,9 +3971,16 @@ void TabSLAPrint::build()
optgroup->append_single_option_line("support_base_safety_distance");
// Mirrored parameter from Pad page for toggling elevation on the same page
optgroup->append_single_option_line("pad_around_object");
// optgroup->append_single_option_line("pad_around_object");
optgroup->append_single_option_line("support_object_elevation");
Line line{ "", "" };
line.full_width = 1;
line.widget = [this](wxWindow* parent) {
return description_line_widget(parent, &m_support_object_elevation_description_line);
};
optgroup->append_line(line);
optgroup = page->new_optgroup(L("Connection of the support sticks and junctions"));
optgroup->append_single_option_line("support_critical_angle");
optgroup->append_single_option_line("support_max_bridge_length");
@ -4047,6 +4054,14 @@ void TabSLAPrint::update()
m_update_cnt++;
m_config_manipulation.update_print_sla_config(m_config, true);
bool elev = !m_config->opt_bool("pad_enable") || !m_config->opt_bool("pad_around_object");
m_support_object_elevation_description_line->SetText(elev ? "" :
from_u8((boost::format(_u8L("\"%1%\" is disabled because \"%2%\" is on in \"%3%\" category.\n"
"To enable \"%1%\", please switch off \"%2%\""))
% _L("Object elevation") % _L("Pad around object") % _L("Pad")).str()));
Layout();
m_update_cnt--;
if (m_update_cnt == 0) {

View file

@ -460,6 +460,9 @@ public:
// Tab(parent, _(L("Print Settings")), L("sla_print")) {}
Tab(parent, _(L("Print Settings")), Slic3r::Preset::TYPE_SLA_PRINT) {}
~TabSLAPrint() {}
ogStaticText* m_support_object_elevation_description_line = nullptr;
void build() override;
void reload_config() override;
void update() override;