Preview class refactoring: Moved initialization of member variables
to header.
This commit is contained in:
parent
fa24d598a7
commit
89ff8eef10
2 changed files with 15 additions and 31 deletions
|
@ -169,27 +169,11 @@ void View3D::render()
|
|||
Preview::Preview(
|
||||
wxWindow* parent, Model* model, DynamicPrintConfig* config,
|
||||
BackgroundSlicingProcess* process, GCodeProcessor::Result* gcode_result, std::function<void()> schedule_background_process_func)
|
||||
: m_canvas_widget(nullptr)
|
||||
, m_canvas(nullptr)
|
||||
, m_left_sizer(nullptr)
|
||||
, m_layers_slider_sizer(nullptr)
|
||||
, m_bottom_toolbar_panel(nullptr)
|
||||
, m_label_view_type(nullptr)
|
||||
, m_choice_view_type(nullptr)
|
||||
, m_label_show(nullptr)
|
||||
, m_combochecklist_features(nullptr)
|
||||
, m_combochecklist_features_pos(0)
|
||||
, m_combochecklist_options(nullptr)
|
||||
, m_config(config)
|
||||
: m_config(config)
|
||||
, m_process(process)
|
||||
, m_gcode_result(gcode_result)
|
||||
, m_number_extruders(1)
|
||||
, m_preferred_color_mode("feature")
|
||||
, m_loaded(false)
|
||||
, m_schedule_background_process(schedule_background_process_func)
|
||||
#ifdef __linux__
|
||||
, m_volumes_cleanup_required(false)
|
||||
#endif // __linux__
|
||||
{
|
||||
if (init(parent, model))
|
||||
load_print();
|
||||
|
|
|
@ -76,17 +76,17 @@ private:
|
|||
|
||||
class Preview : public wxPanel
|
||||
{
|
||||
wxGLCanvas* m_canvas_widget;
|
||||
GLCanvas3D* m_canvas;
|
||||
wxBoxSizer* m_left_sizer;
|
||||
wxBoxSizer* m_layers_slider_sizer;
|
||||
wxPanel* m_bottom_toolbar_panel;
|
||||
wxStaticText* m_label_view_type;
|
||||
wxChoice* m_choice_view_type;
|
||||
wxStaticText* m_label_show;
|
||||
wxComboCtrl* m_combochecklist_features;
|
||||
size_t m_combochecklist_features_pos;
|
||||
wxComboCtrl* m_combochecklist_options;
|
||||
wxGLCanvas* m_canvas_widget { nullptr };
|
||||
GLCanvas3D* m_canvas { nullptr };
|
||||
wxBoxSizer* m_left_sizer { nullptr };
|
||||
wxBoxSizer* m_layers_slider_sizer { nullptr };
|
||||
wxPanel* m_bottom_toolbar_panel { nullptr };
|
||||
wxStaticText* m_label_view_type { nullptr };
|
||||
wxChoice* m_choice_view_type { nullptr };
|
||||
wxStaticText* m_label_show { nullptr };
|
||||
wxComboCtrl* m_combochecklist_features { nullptr };
|
||||
size_t m_combochecklist_features_pos { 0 };
|
||||
wxComboCtrl* m_combochecklist_options { nullptr };
|
||||
|
||||
DynamicPrintConfig* m_config;
|
||||
BackgroundSlicingProcess* m_process;
|
||||
|
@ -95,16 +95,16 @@ class Preview : public wxPanel
|
|||
#ifdef __linux__
|
||||
// We are getting mysterious crashes on Linux in gtk due to OpenGL context activation GH #1874 #1955.
|
||||
// So we are applying a workaround here.
|
||||
bool m_volumes_cleanup_required;
|
||||
bool m_volumes_cleanup_required { false };
|
||||
#endif /* __linux__ */
|
||||
|
||||
// Calling this function object forces Plater::schedule_background_process.
|
||||
std::function<void()> m_schedule_background_process;
|
||||
|
||||
unsigned int m_number_extruders;
|
||||
unsigned int m_number_extruders { 1 };
|
||||
std::string m_preferred_color_mode;
|
||||
|
||||
bool m_loaded;
|
||||
bool m_loaded { false };
|
||||
|
||||
DoubleSlider::Control* m_layers_slider{ nullptr };
|
||||
DoubleSlider::Control* m_moves_slider{ nullptr };
|
||||
|
|
Loading…
Add table
Reference in a new issue