mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Fix build against wxWidgets older than 3.1.1
This commit is contained in:
		
							parent
							
								
									b10d064a24
								
							
						
					
					
						commit
						3f1299c9b7
					
				
					 1 changed files with 16 additions and 1 deletions
				
			
		|  | @ -819,7 +819,22 @@ void PageMaterials::update_lists(int sel_type, int sel_vendor, int last_selected | |||
| 	wxArrayInt sel_printers; | ||||
| 	int sel_printers_count = list_printer->GetSelections(sel_printers); | ||||
| 
 | ||||
|     // Does our wxWidgets version support operator== for wxArrayInt ?
 | ||||
|     // https://github.com/prusa3d/PrusaSlicer/issues/5152#issuecomment-787208614
 | ||||
| #if wxCHECK_VERSION(3, 1, 1) | ||||
|     if (sel_printers != sel_printers_prev) { | ||||
| #else | ||||
|     auto are_equal = [](const wxArrayInt& arr_first, const wxArrayInt& arr_second) { | ||||
|         if (arr_first.GetCount() != arr_second.GetCount()) | ||||
|             return false; | ||||
|         for (size_t i = 0; i < arr_first.GetCount(); i++) | ||||
|             if (arr_first[i] != arr_second[i]) | ||||
|                 return false; | ||||
|         return true; | ||||
|     }; | ||||
|     if (!are_equal(sel_printers, sel_printers_prev)) { | ||||
| #endif | ||||
| 
 | ||||
|         // Refresh type list
 | ||||
| 		list_type->Clear(); | ||||
| 		list_type->append(_L("(All)"), &EMPTY); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lukas Matena
						Lukas Matena