mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Check selection for PresetComboBox
This commit is contained in:
		
							parent
							
								
									fe8e431356
								
							
						
					
					
						commit
						b3c5a62709
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		|  | @ -267,6 +267,12 @@ void PresetComboBox::set_label_marker(int item) | ||||||
|     this->SetClientData(item, (void*)LABEL_ITEM_MARKER); |     this->SetClientData(item, (void*)LABEL_ITEM_MARKER); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void PresetComboBox::check_selection() | ||||||
|  | { | ||||||
|  |     if (this->last_selected != GetSelection()) | ||||||
|  |         this->last_selected = GetSelection(); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| // Frequently changed parameters
 | // Frequently changed parameters
 | ||||||
| 
 | 
 | ||||||
| class FreqChangedParams : public OG_Settings | class FreqChangedParams : public OG_Settings | ||||||
|  | @ -641,7 +647,10 @@ void Sidebar::update_presets(Preset::Type preset_type) | ||||||
|             preset_bundle.sla_materials.update_platter_ui(p->combo_sla_material); |             preset_bundle.sla_materials.update_platter_ui(p->combo_sla_material); | ||||||
|         } |         } | ||||||
| 		// Update the printer choosers, update the dirty flags.
 | 		// Update the printer choosers, update the dirty flags.
 | ||||||
|  |         auto prev_selection = p->combo_printer->GetSelection(); | ||||||
| 		preset_bundle.printers.update_platter_ui(p->combo_printer); | 		preset_bundle.printers.update_platter_ui(p->combo_printer); | ||||||
|  |         if (prev_selection != p->combo_printer->GetSelection()) | ||||||
|  |             p->combo_printer->check_selection(); | ||||||
| 		// Update the filament choosers to only contain the compatible presets, update the color preview,
 | 		// Update the filament choosers to only contain the compatible presets, update the color preview,
 | ||||||
| 		// update the dirty flags.
 | 		// update the dirty flags.
 | ||||||
| 		if (p->plater->printer_technology() == ptFFF) { | 		if (p->plater->printer_technology() == ptFFF) { | ||||||
|  |  | ||||||
|  | @ -44,6 +44,7 @@ public: | ||||||
|     void set_label_marker(int item); |     void set_label_marker(int item); | ||||||
|     void set_extruder_idx(const int extr_idx)   { extruder_idx = extr_idx; } |     void set_extruder_idx(const int extr_idx)   { extruder_idx = extr_idx; } | ||||||
|     int  get_extruder_idx() const               { return extruder_idx; } |     int  get_extruder_idx() const               { return extruder_idx; } | ||||||
|  |     void check_selection(); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     typedef std::size_t Marker; |     typedef std::size_t Marker; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka