mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 06:41:14 -06:00
Merge remote-tracking branch 'origin/enh-port-edit-gcode-dlg' into enh-port-edit-gcode-dlg
This commit is contained in:
commit
907b160007
36 changed files with 156 additions and 304 deletions
|
@ -3221,8 +3221,8 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
|||
// }
|
||||
// break;
|
||||
//}
|
||||
//case 'I':
|
||||
//case 'i': { _update_camera_zoom(1.0); break; }
|
||||
case 'I':
|
||||
case 'i': { _update_camera_zoom(1.0); break; }
|
||||
//case 'K':
|
||||
//case 'k': { wxGetApp().plater()->get_camera().select_next_type(); m_dirty = true; break; }
|
||||
//case 'L':
|
||||
|
@ -3234,8 +3234,8 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
|||
//}
|
||||
//break;
|
||||
//}
|
||||
//case 'O':
|
||||
//case 'o': { _update_camera_zoom(-1.0); break; }
|
||||
case 'O':
|
||||
case 'o': { _update_camera_zoom(-1.0); break; }
|
||||
//case 'Z':
|
||||
//case 'z': {
|
||||
// if (!m_selection.is_empty())
|
||||
|
|
|
@ -2149,8 +2149,8 @@ void ObjectList::load_generic_subobject(const std::string& type_name, const Mode
|
|||
// First (any) GLVolume of the selected instance. They all share the same instance matrix.
|
||||
const GLVolume* v = selection.get_first_volume();
|
||||
// Transform the new modifier to be aligned with the print bed.
|
||||
const BoundingBoxf3 mesh_bb = new_volume->mesh().bounding_box();
|
||||
new_volume->set_transformation(Geometry::Transformation::volume_to_bed_transformation(v->get_instance_transformation(), mesh_bb));
|
||||
new_volume->set_transformation(v->get_instance_transformation().get_matrix_no_offset().inverse());
|
||||
const BoundingBoxf3 mesh_bb = new_volume->mesh().bounding_box();
|
||||
// Set the modifier position.
|
||||
auto offset = (type_name == "Slab") ?
|
||||
// Slab: Lift to print bed
|
||||
|
|
|
@ -388,15 +388,24 @@ bool GLGizmosManager::is_running() const
|
|||
|
||||
bool GLGizmosManager::handle_shortcut(int key)
|
||||
{
|
||||
if (!m_enabled || m_parent.get_selection().is_empty())
|
||||
if (!m_enabled)
|
||||
return false;
|
||||
|
||||
auto it = std::find_if(m_gizmos.begin(), m_gizmos.end(),
|
||||
[key](const std::unique_ptr<GLGizmoBase>& gizmo) {
|
||||
int gizmo_key = gizmo->get_shortcut_key();
|
||||
return gizmo->is_activable()
|
||||
&& ((gizmo_key == key - 64) || (gizmo_key == key - 96));
|
||||
});
|
||||
auto is_key = [pressed_key = key](int gizmo_key) { return (gizmo_key == pressed_key - 64) || (gizmo_key == pressed_key - 96); };
|
||||
// allowe open shortcut even when selection is empty
|
||||
if (GLGizmoBase* gizmo_emboss = m_gizmos[Emboss].get();
|
||||
is_key(gizmo_emboss->get_shortcut_key())) {
|
||||
dynamic_cast<GLGizmoEmboss *>(gizmo_emboss)->on_shortcut_key();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_parent.get_selection().is_empty())
|
||||
return false;
|
||||
|
||||
auto is_gizmo = [is_key](const std::unique_ptr<GLGizmoBase> &gizmo) {
|
||||
return gizmo->is_activable() && is_key(gizmo->get_shortcut_key());
|
||||
};
|
||||
auto it = std::find_if(m_gizmos.begin(), m_gizmos.end(), is_gizmo);
|
||||
|
||||
if (it == m_gizmos.end())
|
||||
return false;
|
||||
|
|
|
@ -258,6 +258,9 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
{ "F", L("Gizmo Place face on bed") },
|
||||
{ "L", L("Gizmo SLA support points") },
|
||||
{ "P", L("Gizmo FDM paint-on seam") },
|
||||
{ "T", L("Gizmo Text emboss / engrave")},
|
||||
{ "I", L("Zoom in")},
|
||||
{ "O", L("Zoom out")},
|
||||
{ "Tab", L("Switch between Prepare/Preview") },
|
||||
|
||||
};
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "MsgDialog.hpp"
|
||||
#include "DownloadProgressDialog.hpp"
|
||||
|
||||
#include <boost/filesystem/string_file.hpp>
|
||||
#include <boost/nowide/utf8_codecvt.hpp>
|
||||
#undef pid_t
|
||||
#include <boost/process.hpp>
|
||||
|
@ -596,7 +595,7 @@ bool MediaPlayCtrl::start_stream_service(bool *need_install)
|
|||
file_url2 = wxURI(file_url2).BuildURI();
|
||||
try {
|
||||
std::string configs;
|
||||
boost::filesystem::load_string_file(file_ff_cfg, configs);
|
||||
load_string_file(file_ff_cfg, configs);
|
||||
std::vector<std::string> configss;
|
||||
boost::algorithm::split(configss, configs, boost::algorithm::is_any_of("\r\n"));
|
||||
configss.erase(std::remove(configss.begin(), configss.end(), std::string()), configss.end());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue