mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	ENH: disable use_ams if not supported
Change-Id: Iebed3edd7fbd7733109ea8dfaac50f5c8fa27d04 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
		
							parent
							
								
									2f12ad7bf2
								
							
						
					
					
						commit
						e2002ec152
					
				
					 3 changed files with 9 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1790,6 +1790,9 @@ bool MachineObject::is_function_supported(PrinterFunction func)
 | 
			
		|||
    case FUNC_PRINT_WITHOUT_SD:
 | 
			
		||||
        func_name = "FUNC_PRINT_WITHOUT_SD";
 | 
			
		||||
        break;
 | 
			
		||||
    case FUNC_USE_AMS:
 | 
			
		||||
        func_name = "FUNC_USE_AMS";
 | 
			
		||||
        break;
 | 
			
		||||
    default:
 | 
			
		||||
        return true;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,6 +71,7 @@ enum PrinterFunction {
 | 
			
		|||
    FUNC_LOCAL_TUNNEL,
 | 
			
		||||
    FUNC_PRINT_WITHOUT_SD,
 | 
			
		||||
    FUNC_VIRTUAL_CAMERA,
 | 
			
		||||
    FUNC_USE_AMS,
 | 
			
		||||
    FUNC_MAX
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2175,8 +2175,12 @@ void SelectMachineDialog::on_selection_changed(wxCommandEvent &event)
 | 
			
		|||
 | 
			
		||||
void SelectMachineDialog::update_ams_check(MachineObject* obj)
 | 
			
		||||
{
 | 
			
		||||
    if (obj && obj->ams_support_use_ams && obj->has_ams()) {
 | 
			
		||||
    if (obj && obj->is_function_supported(FUNC_USE_AMS)
 | 
			
		||||
        && obj->ams_support_use_ams
 | 
			
		||||
        && obj->has_ams()) {
 | 
			
		||||
        select_use_ams->Show();
 | 
			
		||||
        // set ams_check to true by default
 | 
			
		||||
        ams_check->SetValue(true);
 | 
			
		||||
    } else {
 | 
			
		||||
        select_use_ams->Hide();
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue