@@ -843,24 +843,24 @@ protected slots:
843843 QImage buffer_;
844844
845845 // / Stores the current action mode (Pick, Zoom, Translate)
846- ActionModes action_mode_;
846+ ActionModes action_mode_ = AM_TRANSLATE ;
847847
848848 // / Stores the used intensity mode function
849- IntensityModes intensity_mode_;
849+ IntensityModes intensity_mode_ = IM_NONE ;
850850
851851 // / Layer data
852852 LayerStack layers_;
853853
854854 // / Stores the mapping of m/z
855- bool mz_to_x_axis_;
855+ bool mz_to_x_axis_ = true ;
856856
857857 /* *
858858 @brief Stores the currently visible area.
859859
860860 Dimension 0 is the m/z dimension.@n
861861 Dimension 1 is the RT dimension (2D and 3D view) or the intensity dimension (1D view).
862862 */
863- AreaType visible_area_;
863+ AreaType visible_area_ = AreaType::empty ;
864864
865865 /* *
866866 @brief Recalculates the overall_data_range_
@@ -880,15 +880,15 @@ protected slots:
880880 Dimension 1 is the RT dimension (2D and 3D view) or the intensity dimension (1D view).@n
881881 Dimension 2 is the intensity dimension (2D and 3D view) or the RT dimension (1D view).
882882 */
883- DRange<3 > overall_data_range_;
883+ DRange<3 > overall_data_range_ = DRange< 3 >::empty ;
884884
885885 // / Stores whether or not to show a grid.
886- bool show_grid_;
886+ bool show_grid_ = true ;
887887
888888 // / The zoom stack.
889889 std::vector<AreaType> zoom_stack_;
890890 // / The current position in the zoom stack
891- std::vector<AreaType>::iterator zoom_pos_;
891+ std::vector<AreaType>::iterator zoom_pos_ = zoom_stack_.end() ;
892892
893893 /* *
894894 @brief Updates the displayed data
@@ -905,10 +905,10 @@ protected slots:
905905 void modificationStatus_ (Size layer_index, bool modified);
906906
907907 // / Whether to recalculate the data in the buffer when repainting
908- bool update_buffer_;
908+ bool update_buffer_ = false ;
909909
910910 // / Back-pointer to the enclosing spectrum widget
911- PlotWidget * spectrum_widget_;
911+ PlotWidget* spectrum_widget_ = nullptr ;
912912
913913 // / start position of mouse actions
914914 QPoint last_mouse_pos_;
@@ -918,7 +918,7 @@ protected slots:
918918
919919 In this mode all layers are scaled to the same maximum.
920920 */
921- double percentage_factor_;
921+ double percentage_factor_ = 1.0 ;
922922
923923 /* *
924924 @brief Intensity scaling factor for 'snap to maximum intensity mode'.
@@ -927,16 +927,16 @@ protected slots:
927927
928928 One entry per layer.
929929 */
930- std::vector<double > snap_factors_;
930+ std::vector<double > snap_factors_ = { 1.0 } ;
931931
932932 // / Rubber band for selected area
933933 QRubberBand rubber_band_;
934934
935935 // / External context menu extension
936- QMenu* context_add_;
936+ QMenu* context_add_ = nullptr ;
937937
938938 // / Flag that determines if timing data is printed to the command line
939- bool show_timing_;
939+ bool show_timing_ = false ;
940940
941941 // / selected peak
942942 PeakIndex selected_peak_;
0 commit comments