mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	#5690 - Fixed thumbnail generation when a gizmo is active
This commit is contained in:
		
							parent
							
								
									a629401916
								
							
						
					
					
						commit
						b93c2aea44
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -1331,7 +1331,7 @@ void GLCanvas3D::toggle_model_objects_visibility(bool visible, const ModelObject | |||
| { | ||||
|     for (GLVolume* vol : m_volumes.volumes) { | ||||
|         if (vol->composite_id.object_id == 1000) { // wipe tower
 | ||||
|                 vol->is_active = (visible && mo == nullptr); | ||||
|             vol->is_active = (visible && mo == nullptr); | ||||
|         } | ||||
|         else { | ||||
|             if ((mo == nullptr || m_model->objects[vol->composite_id.object_id] == mo) | ||||
|  | @ -4151,9 +4151,13 @@ void GLCanvas3D::_render_thumbnail_internal(ThumbnailData& thumbnail_data, bool | |||
|     shader->start_using(); | ||||
|     shader->set_uniform("print_box.volume_detection", 0); | ||||
| 
 | ||||
|     for (const GLVolume* vol : visible_volumes) { | ||||
|     for (GLVolume* vol : visible_volumes) { | ||||
|         shader->set_uniform("uniform_color", (vol->printable && !vol->is_outside) ? orange : gray); | ||||
|         // the volume may have been deactivated by an active gizmo
 | ||||
|         bool is_active = vol->is_active; | ||||
|         vol->is_active = true; | ||||
|         vol->render(); | ||||
|         vol->is_active = is_active; | ||||
|     } | ||||
| 
 | ||||
|     shader->stop_using(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966