mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Fixed crash on BedShapeDialog creation
This commit is contained in:
		
							parent
							
								
									d5bd76776f
								
							
						
					
					
						commit
						5243d3e53c
					
				
					 2 changed files with 11 additions and 4 deletions
				
			
		|  | @ -229,11 +229,11 @@ void BedShapePanel::build_panel(const ConfigOptionPoints& default_pt, const Conf | |||
|     auto optgroup = init_shape_options_page(BedShape::get_name(BedShape::Type::Rectangular)); | ||||
|     BedShape::append_option_line(optgroup, BedShape::Parameter::RectSize); | ||||
|     BedShape::append_option_line(optgroup, BedShape::Parameter::RectOrigin); | ||||
|     optgroup->activate(); | ||||
|     activate_options_page(optgroup); | ||||
| 
 | ||||
|     optgroup = init_shape_options_page(BedShape::get_name(BedShape::Type::Circular)); | ||||
|     BedShape::append_option_line(optgroup, BedShape::Parameter::Diameter); | ||||
|     optgroup->activate(); | ||||
|     activate_options_page(optgroup); | ||||
| 
 | ||||
|     optgroup = init_shape_options_page(BedShape::get_name(BedShape::Type::Custom)); | ||||
| 
 | ||||
|  | @ -254,7 +254,7 @@ void BedShapePanel::build_panel(const ConfigOptionPoints& default_pt, const Conf | |||
| 		return sizer; | ||||
| 	}; | ||||
| 	optgroup->append_line(line); | ||||
|     optgroup->activate(); | ||||
|     activate_options_page(optgroup); | ||||
| 
 | ||||
|     wxPanel* texture_panel = init_texture_panel(); | ||||
|     wxPanel* model_panel = init_model_panel(); | ||||
|  | @ -297,12 +297,18 @@ ConfigOptionsGroupShp BedShapePanel::init_shape_options_page(const wxString& tit | |||
|     }; | ||||
| 	 | ||||
|     m_optgroups.push_back(optgroup); | ||||
|     panel->SetSizerAndFit(optgroup->sizer); | ||||
| //    panel->SetSizerAndFit(optgroup->sizer);
 | ||||
|     m_shape_options_book->AddPage(panel, title); | ||||
| 
 | ||||
|     return optgroup; | ||||
| } | ||||
| 
 | ||||
| void BedShapePanel::activate_options_page(ConfigOptionsGroupShp options_group) | ||||
| { | ||||
|     options_group->activate(); | ||||
|     options_group->parent()->SetSizerAndFit(options_group->sizer); | ||||
| } | ||||
| 
 | ||||
| wxPanel* BedShapePanel::init_texture_panel() | ||||
| { | ||||
|     wxPanel* panel = new wxPanel(this); | ||||
|  |  | |||
|  | @ -75,6 +75,7 @@ public: | |||
| 
 | ||||
| private: | ||||
|     ConfigOptionsGroupShp	init_shape_options_page(const wxString& title); | ||||
|     void	    activate_options_page(ConfigOptionsGroupShp options_group); | ||||
|     wxPanel*    init_texture_panel(); | ||||
|     wxPanel*    init_model_panel(); | ||||
|     void		set_shape(const ConfigOptionPoints& points); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka