mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 02:01:12 -06:00
Merge remote-tracking branch 'origin/master' into ys_unsaved_changes
This commit is contained in:
commit
8f15efbf9a
13 changed files with 212 additions and 144 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1173,7 +1173,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -3995,9 +3995,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");
|
||||
|
|
@ -4071,6 +4078,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) {
|
||||
|
|
|
|||
|
|
@ -461,6 +461,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue