ENH: 3d mouse shortcut change to ctrl+m
jira: STUDIO-7448 Change-Id: Ie444d9d84ef644694ab63a16722c9810bc1560fb (cherry picked from commit 5edced9d4b371f2a7f8c8f511845fc9084db0f87)
This commit is contained in:
parent
0d393d64b8
commit
18a0a7e6e7
|
@ -1844,7 +1844,7 @@ void GLCanvas3D::render(bool only_init)
|
|||
|
||||
if (!is_initialized() && !init())
|
||||
return;
|
||||
if (m_canvas_type == ECanvasType::CanvasView3D && m_gizmos.get_current_type() == GLGizmosManager::Undefined) {
|
||||
if (m_canvas_type == ECanvasType::CanvasView3D && m_gizmos.get_current_type() == GLGizmosManager::Undefined) {
|
||||
enable_return_toolbar(false);
|
||||
}
|
||||
if (!m_main_toolbar.is_enabled())
|
||||
|
@ -3105,24 +3105,26 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
|||
break;
|
||||
#ifdef __APPLE__
|
||||
case 'm':
|
||||
case 'M': {
|
||||
wxGetApp().mainframe->Iconize();
|
||||
break;
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
#ifdef __APPLE__
|
||||
case 'b':
|
||||
case 'B':
|
||||
case 'M':
|
||||
#else /* __APPLE__ */
|
||||
case WXK_CONTROL_B:
|
||||
case WXK_CONTROL_M:
|
||||
#endif /* __APPLE__ */
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (wxGetApp().app_config->get("use_legacy_3DConnexion") == "true") {
|
||||
#endif //_WIN32
|
||||
Mouse3DController &controller = wxGetApp().plater()->get_mouse3d_controller();
|
||||
controller.show_settings_dialog(!controller.is_settings_dialog_shown());
|
||||
m_dirty = true;
|
||||
#ifdef __APPLE__
|
||||
// On OSX use Cmd+Shift+M to "Show/Hide 3Dconnexion devices settings dialog"
|
||||
if ((evt.GetModifiers() & shiftMask) != 0) {
|
||||
#endif // __APPLE__
|
||||
Mouse3DController &controller = wxGetApp().plater()->get_mouse3d_controller();
|
||||
controller.show_settings_dialog(!controller.is_settings_dialog_shown());
|
||||
m_dirty = true;
|
||||
#ifdef __APPLE__
|
||||
} else
|
||||
// and Cmd+M to minimize application
|
||||
wxGetApp().mainframe->Iconize();
|
||||
#endif // __APPLE__
|
||||
#ifdef _WIN32
|
||||
}
|
||||
#endif //_WIN32
|
||||
|
@ -3249,7 +3251,7 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
|
|||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9': {
|
||||
|
@ -6218,7 +6220,7 @@ void GLCanvas3D::render_thumbnail_framebuffer_ext(ThumbnailData& thumbnail_data,
|
|||
|
||||
void GLCanvas3D::render_thumbnail_legacy(ThumbnailData& thumbnail_data, unsigned int w, unsigned int h, const ThumbnailsParams& thumbnail_params, PartPlateList &partplate_list, ModelObjectPtrs& model_objects, const GLVolumeCollection& volumes, std::vector<std::array<float, 4>>& extruder_colors, GLShaderProgram* shader, Camera::EType camera_type,
|
||||
bool use_top_view,
|
||||
bool for_picking,
|
||||
bool for_picking,
|
||||
bool ban_light)
|
||||
{
|
||||
// check that thumbnail size does not exceed the default framebuffer size
|
||||
|
|
|
@ -196,10 +196,11 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
{ ctrl + "P", L("Preferences") },
|
||||
#endif
|
||||
//3Dconnexion control
|
||||
|
||||
{ ctrl + "B", L("Show/Hide 3Dconnexion devices settings dialog") },
|
||||
|
||||
|
||||
#ifndef __APPLE__
|
||||
{ctrl + "Shift+M", L("Show/Hide 3Dconnexion devices settings dialog")},
|
||||
#else
|
||||
{ctrl + "M", L("Show/Hide 3Dconnexion devices settings dialog")},
|
||||
#endif
|
||||
// Switch table page
|
||||
#ifndef __APPLE__
|
||||
{ ctrl + "Tab", L("Switch tab page")},
|
||||
|
@ -298,7 +299,7 @@ void KBShortcutsDialog::fill_shortcuts()
|
|||
{L("Shift+Mouse wheel"), L("Move slider 5x faster")},
|
||||
{L(ctrl+"Any arrow"), L("Move slider 5x faster")},
|
||||
{L(ctrl+"Mouse wheel"), L("Move slider 5x faster")},
|
||||
|
||||
|
||||
};
|
||||
m_full_shortcuts.push_back({ { _L("Preview"), "" }, preview_shortcuts });
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
|||
set_miniaturizable(GetHandle());
|
||||
#endif
|
||||
|
||||
if (!wxGetApp().app_config->has("user_mode")) {
|
||||
if (!wxGetApp().app_config->has("user_mode")) {
|
||||
wxGetApp().app_config->set("user_mode", "simple");
|
||||
wxGetApp().app_config->set_bool("developer_mode", false);
|
||||
wxGetApp().app_config->save();
|
||||
|
@ -574,7 +574,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
|||
wxGetApp().plater()->get_current_canvas3D()->request_extra_frame();
|
||||
event.Skip();
|
||||
});
|
||||
#endif
|
||||
#endif
|
||||
|
||||
update_ui_from_settings(); // FIXME (?)
|
||||
|
||||
|
@ -637,12 +637,12 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
|||
return;
|
||||
}
|
||||
else if (evt.CmdDown() && evt.GetKeyCode() == 'G') { if (can_export_gcode()) { wxPostEvent(m_plater, SimpleEvent(EVT_GLTOOLBAR_EXPORT_SLICED_FILE)); } evt.Skip(); return; }
|
||||
if (evt.CmdDown() && evt.GetKeyCode() == 'J') { m_printhost_queue_dlg->Show(); return; }
|
||||
if (evt.CmdDown() && evt.GetKeyCode() == 'J') { m_printhost_queue_dlg->Show(); return; }
|
||||
if (evt.CmdDown() && evt.GetKeyCode() == 'N') { m_plater->new_project(); return;}
|
||||
if (evt.CmdDown() && evt.GetKeyCode() == 'O') { m_plater->load_project(); return;}
|
||||
if (evt.CmdDown() && evt.ShiftDown() && evt.GetKeyCode() == 'S') { if (can_save_as()) m_plater->save_project(true); return;}
|
||||
else if (evt.CmdDown() && evt.GetKeyCode() == 'S') { if (can_save()) m_plater->save_project(); return;}
|
||||
if (evt.CmdDown() && evt.GetKeyCode() == 'F') {
|
||||
if (evt.CmdDown() && evt.GetKeyCode() == 'F') {
|
||||
if (m_plater && (m_tabpanel->GetSelection() == TabPosition::tp3DEditor || m_tabpanel->GetSelection() == TabPosition::tpPreview)) {
|
||||
m_plater->sidebar().can_search();
|
||||
}
|
||||
|
@ -1981,7 +1981,7 @@ void MainFrame::update_side_button_style()
|
|||
m_slice_btn->SetExtraSize(wxSize(FromDIP(38), FromDIP(10)));
|
||||
m_slice_btn->SetBottomColour(wxColour(0x3B4446));*/
|
||||
StateColor m_btn_bg_enable = StateColor(
|
||||
std::pair<wxColour, int>(wxColour(27, 136, 68), StateColor::Pressed),
|
||||
std::pair<wxColour, int>(wxColour(27, 136, 68), StateColor::Pressed),
|
||||
std::pair<wxColour, int>(wxColour(48, 221, 112), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(wxColour(0, 174, 66), StateColor::Normal)
|
||||
);
|
||||
|
@ -2545,7 +2545,7 @@ void MainFrame::init_menubar_as_editor()
|
|||
#if 0
|
||||
// BBS Delete selected
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Delete selected") + "\tBackSpace",
|
||||
_L("Deletes the current selection"),[this](wxCommandEvent&) {
|
||||
_L("Deletes the current selection"),[this](wxCommandEvent&) {
|
||||
m_plater->remove_selected();
|
||||
},
|
||||
"", nullptr, [this](){return can_delete(); }, this);
|
||||
|
@ -2581,7 +2581,7 @@ void MainFrame::init_menubar_as_editor()
|
|||
|
||||
// BBS Select All
|
||||
append_menu_item(editMenu, wxID_ANY, _L("Select all") + "\t" + ctrl + "A",
|
||||
_L("Selects all objects"), [this, handle_key_event](wxCommandEvent&) {
|
||||
_L("Selects all objects"), [this, handle_key_event](wxCommandEvent&) {
|
||||
wxKeyEvent e;
|
||||
e.SetEventType(wxEVT_KEY_DOWN);
|
||||
e.SetControlDown(true);
|
||||
|
@ -2666,7 +2666,7 @@ void MainFrame::init_menubar_as_editor()
|
|||
this, [this]() { return m_plater->is_view3D_shown(); }, [this]() { return m_plater->is_view3D_overhang_shown(); }, this);
|
||||
viewMenu->AppendSeparator();
|
||||
append_menu_item(
|
||||
viewMenu, wxID_ANY, _L("Set 3DConnexion") + "\t" + ctrl + "B", _L("Set 3DConnexion mouse"),
|
||||
viewMenu, wxID_ANY, _L("Set 3DConnexion"), _L("Set 3DConnexion mouse"),
|
||||
[this](wxCommandEvent &) {
|
||||
#ifdef _WIN32
|
||||
if (wxGetApp().app_config->get("use_legacy_3DConnexion") == "true") {
|
||||
|
@ -2708,7 +2708,7 @@ void MainFrame::init_menubar_as_editor()
|
|||
wxWindowID bambu_studio_id_base = wxWindow::NewControlId(int(2));
|
||||
wxMenu* parent_menu = m_menubar->OSXGetAppleMenu();
|
||||
//auto preference_item = new wxMenuItem(parent_menu, BambuStudioMenuPreferences + bambu_studio_id_base, _L("Preferences") + "\tCtrl+,", "");
|
||||
|
||||
|
||||
std::string app_items[] = {
|
||||
L("Services"),
|
||||
L("Hide BambuStudio"),
|
||||
|
@ -2926,7 +2926,7 @@ void MainFrame::init_menubar_as_editor()
|
|||
m_topbar->GetCalibMenu()->AppendSubMenu(advance_menu, _L("More..."));
|
||||
}
|
||||
|
||||
// help
|
||||
// help
|
||||
append_menu_item(m_topbar->GetCalibMenu(), wxID_ANY, _L("Tutorial"), _L("Calibration help"),
|
||||
[this](wxCommandEvent&) {
|
||||
try {
|
||||
|
@ -3072,7 +3072,7 @@ void MainFrame::init_menubar_as_editor()
|
|||
;
|
||||
},
|
||||
this);
|
||||
|
||||
|
||||
m_menubar->Append(new wxMenu(), L("Window"));
|
||||
std::string window_items[] = {
|
||||
L("Minimize"),
|
||||
|
@ -3245,7 +3245,7 @@ void MainFrame::export_config()
|
|||
{
|
||||
ExportConfigsDialog export_configs_dlg(nullptr);
|
||||
export_configs_dlg.ShowModal();
|
||||
return;
|
||||
return;
|
||||
|
||||
// Generate a cummulative configuration for the selected print, filaments and printer.
|
||||
wxDirDialog dlg(this, _L("Choose a directory"),
|
||||
|
@ -3765,7 +3765,7 @@ void MainFrame::load_printer_url()
|
|||
PresetBundle &preset_bundle = *wxGetApp().preset_bundle;
|
||||
if (preset_bundle.printers.get_edited_preset().is_bbl_vendor_preset(&preset_bundle))
|
||||
return;
|
||||
|
||||
|
||||
auto cfg = preset_bundle.printers.get_edited_preset().config;
|
||||
wxString url =
|
||||
cfg.opt_string("print_host_webui").empty() ? cfg.opt_string("print_host") : cfg.opt_string("print_host_webui");
|
||||
|
@ -3792,9 +3792,9 @@ void MainFrame::RunScript(wxString js)
|
|||
m_webview->RunScript(js);
|
||||
}
|
||||
|
||||
void MainFrame::RunScriptLeft(wxString js)
|
||||
void MainFrame::RunScriptLeft(wxString js)
|
||||
{
|
||||
if (m_webview != nullptr)
|
||||
if (m_webview != nullptr)
|
||||
m_webview->RunScriptLeft(js);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue