mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	ENH:add some global shortcut key
Change-Id: Ib29d13c84755b0e4e15b6a4c25583df91653aa84
This commit is contained in:
		
							parent
							
								
									688084c475
								
							
						
					
					
						commit
						5f71eba979
					
				
					 2 changed files with 21 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -177,7 +177,13 @@ void KBShortcutsDialog::fill_shortcuts()
 | 
			
		|||
            { ctrl + "S", L("Save Project") },
 | 
			
		||||
            { ctrl + alt + "S", L("Save Project as") },
 | 
			
		||||
            // File>Import
 | 
			
		||||
            { ctrl + "I", L("Import geometry data from STL/STEP/3MF/OBJ/AMF files.") },
 | 
			
		||||
            { ctrl + "I", L("Import geometry data from STL/STEP/3MF/OBJ/AMF files") },
 | 
			
		||||
            // File>Export
 | 
			
		||||
            { ctrl + "G", L("Export plate sliced file")},
 | 
			
		||||
            // Slice plate
 | 
			
		||||
            { ctrl + "R", L("Slice plate")},
 | 
			
		||||
            // Send to Print
 | 
			
		||||
            { ctrl + "Shift" + "G", L("Print plate")},
 | 
			
		||||
            // Edit
 | 
			
		||||
            { ctrl + "X", L("Cut") },
 | 
			
		||||
            { ctrl + "C", L("Copy to clipboard") },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -520,7 +520,19 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
 | 
			
		|||
            }
 | 
			
		||||
            return;}
 | 
			
		||||
#endif
 | 
			
		||||
        if (evt.CmdDown() && evt.GetKeyCode() == 'J') { m_printhost_queue_dlg->Show(); return; }
 | 
			
		||||
        if (evt.CmdDown() && evt.GetKeyCode() == 'R') { if (m_slice_enable) { wxPostEvent(m_plater, SimpleEvent(EVT_GLTOOLBAR_SLICE_PLATE)); this->m_tabpanel->SetSelection(tpPreview); } return; }
 | 
			
		||||
        if (evt.CmdDown() && evt.ShiftDown() && evt.GetKeyCode() == 'G') {
 | 
			
		||||
            m_plater->apply_background_progress();
 | 
			
		||||
            m_print_enable = get_enable_print_status();
 | 
			
		||||
            m_print_btn->Enable(m_print_enable);
 | 
			
		||||
            if (m_print_enable) {
 | 
			
		||||
                wxPostEvent(m_plater, SimpleEvent(EVT_GLTOOLBAR_PRINT_PLATE));
 | 
			
		||||
            }
 | 
			
		||||
            evt.Skip();
 | 
			
		||||
            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() == '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;}
 | 
			
		||||
| 
						 | 
				
			
			@ -2070,7 +2082,7 @@ void MainFrame::init_menubar_as_editor()
 | 
			
		|||
            [this](wxCommandEvent&) { if (m_plater) m_plater->export_core_3mf(); }, "menu_export_sliced_file", nullptr,
 | 
			
		||||
            [this](){return can_export_model(); }, this);
 | 
			
		||||
        // BBS export .gcode.3mf
 | 
			
		||||
        append_menu_item(export_menu, wxID_ANY, _L("Export plate sliced file") + dots/* + "\tCtrl+G"*/, _L("Export current sliced file"),
 | 
			
		||||
        append_menu_item(export_menu, wxID_ANY, _L("Export plate sliced file") + dots + "\tCtrl+G", _L("Export current sliced file"),
 | 
			
		||||
            [this](wxCommandEvent&) { if (m_plater) wxPostEvent(m_plater, SimpleEvent(EVT_GLTOOLBAR_EXPORT_SLICED_FILE)); }, "menu_export_sliced_file", nullptr,
 | 
			
		||||
            [this](){return can_export_gcode(); }, this);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue