mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:22:43 +00:00 
			
		
		
		
	LibGUI: Remove redundant Widget::update calls from DatePicker
In DatePicker constructor, calling to Widget::update after Calendar::update_tiles is redundant since it is already called internally by update_tiles. This commit also remove unused header files from DatePicker header.
This commit is contained in:
		
							parent
							
								
									bc9bba1d9b
								
							
						
					
					
						commit
						1153068407
					
				
					 1 changed files with 0 additions and 4 deletions
				
			
		|  | @ -8,8 +8,6 @@ | |||
| #include <LibGUI/ComboBox.h> | ||||
| #include <LibGUI/DatePicker.h> | ||||
| #include <LibGUI/DatePickerDialogGML.h> | ||||
| #include <LibGUI/ImageWidget.h> | ||||
| #include <LibGUI/Label.h> | ||||
| #include <LibGUI/SpinBox.h> | ||||
| #include <LibGUI/TextBox.h> | ||||
| 
 | ||||
|  | @ -48,7 +46,6 @@ DatePicker::DatePicker(Window* parent_window, String const& title, Core::DateTim | |||
|         m_selected_date.set_time(static_cast<int>(m_selected_date.year()), index.row() + 1); | ||||
|         calendar.set_selected_date(m_selected_date); | ||||
|         calendar.update_tiles(m_selected_date.year(), m_selected_date.month()); | ||||
|         calendar.update(); | ||||
|     }; | ||||
| 
 | ||||
|     m_year_box = widget->find_descendant_of_type_named<GUI::SpinBox>("year_box"); | ||||
|  | @ -57,7 +54,6 @@ DatePicker::DatePicker(Window* parent_window, String const& title, Core::DateTim | |||
|         m_selected_date.set_time(year, static_cast<int>(m_selected_date.month())); | ||||
|         calendar.set_selected_date(m_selected_date); | ||||
|         calendar.update_tiles(m_selected_date.year(), m_selected_date.month()); | ||||
|         calendar.update(); | ||||
|     }; | ||||
| 
 | ||||
|     auto& ok_button = *widget->find_descendant_of_type_named<GUI::Button>("ok_button"); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Domenico Iezzi
						Domenico Iezzi