Fixed conflicts after merge with master
This commit is contained in:
commit
ad72e29612
163 changed files with 8950 additions and 6561 deletions
src/slic3r/GUI
|
@ -911,21 +911,14 @@ void ObjectList::list_manipulation(const wxPoint& mouse_pos, bool evt_context_me
|
|||
toggle_printable_state();
|
||||
else if (title == _("Editing"))
|
||||
show_context_menu(evt_context_menu);
|
||||
else if (title == _("Name"))
|
||||
{
|
||||
if (wxOSX)
|
||||
show_context_menu(evt_context_menu); // return context menu under OSX (related to #2909)
|
||||
|
||||
if (is_windows10())
|
||||
{
|
||||
int obj_idx, vol_idx;
|
||||
get_selected_item_indexes(obj_idx, vol_idx, item);
|
||||
|
||||
if (m_objects_model->HasWarningIcon(item) &&
|
||||
mouse_pos.x > 2 * wxGetApp().em_unit() && mouse_pos.x < 4 * wxGetApp().em_unit())
|
||||
fix_through_netfabb();
|
||||
}
|
||||
}
|
||||
else if (title == _("Name"))
|
||||
{
|
||||
if (is_windows10() && m_objects_model->HasWarningIcon(item) &&
|
||||
mouse_pos.x > 2 * wxGetApp().em_unit() && mouse_pos.x < 4 * wxGetApp().em_unit())
|
||||
fix_through_netfabb();
|
||||
else if (evt_context_menu)
|
||||
show_context_menu(evt_context_menu); // show context menu for "Name" column too
|
||||
}
|
||||
// workaround for extruder editing under OSX
|
||||
else if (wxOSX && evt_context_menu && title == _("Extruder"))
|
||||
extruder_editing();
|
||||
|
@ -1758,12 +1751,9 @@ void ObjectList::load_mesh_object(const TriangleMesh &mesh, const wxString &name
|
|||
new_object->invalidate_bounding_box();
|
||||
new_object->translate(-bb.center());
|
||||
|
||||
if (center) {
|
||||
const BoundingBoxf bed_shape = wxGetApp().plater()->bed_shape_bb();
|
||||
new_object->instances[0]->set_offset(Slic3r::to_3d(bed_shape.center().cast<double>(), -new_object->origin_translation.z()));
|
||||
} else {
|
||||
new_object->instances[0]->set_offset(bb.center());
|
||||
}
|
||||
new_object->instances[0]->set_offset(center ?
|
||||
to_3d(wxGetApp().plater()->build_volume().bounding_volume2d().center(), -new_object->origin_translation.z()) :
|
||||
bb.center());
|
||||
|
||||
new_object->ensure_on_bed();
|
||||
|
||||
|
@ -4036,18 +4026,8 @@ void ObjectList::rename_item()
|
|||
if (new_name.IsEmpty())
|
||||
return;
|
||||
|
||||
bool is_unusable_symbol = false;
|
||||
std::string chosen_name = Slic3r::normalize_utf8_nfc(new_name.ToUTF8());
|
||||
const char* unusable_symbols = "<>:/\\|?*\"";
|
||||
for (size_t i = 0; i < std::strlen(unusable_symbols); i++) {
|
||||
if (chosen_name.find_first_of(unusable_symbols[i]) != std::string::npos) {
|
||||
is_unusable_symbol = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_unusable_symbol) {
|
||||
show_error(this, _(L("The supplied name is not valid;")) + "\n" +
|
||||
_(L("the following characters are not allowed:")) + " <>:/\\|?*\"");
|
||||
if (Plater::has_illegal_filename_characters(new_name)) {
|
||||
Plater::show_illegal_characters_warning(this);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4267,10 +4247,7 @@ void ObjectList::OnEditingDone(wxDataViewEvent &event)
|
|||
const auto renderer = dynamic_cast<BitmapTextRenderer*>(GetColumn(colName)->GetRenderer());
|
||||
|
||||
if (renderer->WasCanceled())
|
||||
wxTheApp->CallAfter([this]{
|
||||
show_error(this, _(L("The supplied name is not valid;")) + "\n" +
|
||||
_(L("the following characters are not allowed:")) + " <>:/\\|?*\"");
|
||||
});
|
||||
wxTheApp->CallAfter([this]{ Plater::show_illegal_characters_warning(this); });
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Workaround for entering the column editing mode on Windows. Simulate keyboard enter when another column of the active line is selected.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue