mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Remove some gtk warnings on application start.
This commit is contained in:
		
							parent
							
								
									71574b2dd4
								
							
						
					
					
						commit
						be8f464bf8
					
				
					 2 changed files with 9 additions and 3 deletions
				
			
		|  | @ -230,9 +230,9 @@ ObjectList::ObjectList(wxWindow* parent) : | |||
| 	// So the postponed EnsureVisible() call is planned for an item, which may not exist at the Idle processing time, if this wxEVT_SIZE
 | ||||
| 	// event is succeeded by a delete of the currently active item. We are trying our luck by postponing the wxEVT_SIZE triggered EnsureVisible(),
 | ||||
| 	// which seems to be working as of now.
 | ||||
| 	this->CallAfter([this](){ this->EnsureVisible(this->GetCurrentItem()); }); | ||||
|     this->CallAfter([this](){ ensure_current_item_visible(); }); | ||||
| #else | ||||
| 	this->EnsureVisible(this->GetCurrentItem()); | ||||
|     ensure_current_item_visible(); | ||||
| #endif | ||||
| 	e.Skip(); | ||||
| 	})); | ||||
|  | @ -3162,7 +3162,7 @@ void ObjectList::update_selections() | |||
|     select_items(sels); | ||||
| 
 | ||||
|     // Scroll selected Item in the middle of an object list
 | ||||
|     this->EnsureVisible(this->GetCurrentItem()); | ||||
|     ensure_current_item_visible(); | ||||
| } | ||||
| 
 | ||||
| void ObjectList::update_selections_on_canvas() | ||||
|  |  | |||
|  | @ -171,6 +171,12 @@ private: | |||
|     SettingsBundle m_freq_settings_sla; | ||||
| #endif | ||||
| 
 | ||||
|     inline void ensure_current_item_visible() | ||||
|     { | ||||
|         if (const auto &item = this->GetCurrentItem()) | ||||
|             this->EnsureVisible(item); | ||||
|     } | ||||
| 
 | ||||
| public: | ||||
|     ObjectList(wxWindow* parent); | ||||
|     ~ObjectList(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tamasmeszaros
						tamasmeszaros