Skip to content

Commit 3f48e83

Browse files
ThomasKroesSreeparna Deb
authored andcommitted
Coding/style improvements
1 parent d2d8de3 commit 3f48e83

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/ColoringAction.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,30 @@ ColoringAction::ColoringAction(QObject* parent, const QString& title) :
7171
_constantColorAction.setEnabled(currentIndex == 0);
7272

7373
const auto currentColorDataset = getCurrentColorDataset();
74-
if (_currentColorPointsDataset.isValid())
75-
{
74+
75+
if (_currentColorPointsDataset.isValid()) {
7676
disconnect(&_currentColorPointsDataset, &Dataset<Points>::dataDimensionsChanged, this, nullptr);
7777
}
78+
7879
_currentColorPointsDataset = Dataset<Points>();
79-
if (currentColorDataset.isValid()) {
80-
const auto currentColorDatasetTypeIsPointType = currentColorDataset->getDataType() == PointType;
8180

82-
if (currentColorDatasetTypeIsPointType) {
81+
if (currentColorDataset.isValid()) {
82+
if (currentColorDataset->getDataType() == PointType) {
8383
_currentColorPointsDataset = currentColorDataset.get<Points>();
84+
8485
if (_currentColorPointsDataset.isValid()) {
8586
connect(&_currentColorPointsDataset, &Dataset<Points>::dataDimensionsChanged, this, [this]() {
86-
if (_currentColorPointsDataset.isValid())
87-
{
87+
if (_currentColorPointsDataset.isValid()) {
8888
_dimensionAction.setPointsDataset(_currentColorPointsDataset);
8989
updateScatterPlotWidgetColors();
9090
}
91-
});
91+
});
92+
9293
_dimensionAction.setPointsDataset(_currentColorPointsDataset);
9394
}
9495
else {
9596
_dimensionAction.setPointsDataset(Dataset<Points>());
9697
}
97-
9898
}
9999
else {
100100
_dimensionAction.setPointsDataset(Dataset<Points>());

src/ColoringAction.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ class ColoringAction : public VerticalGroupAction
127127
void currentColorDatasetChanged(Dataset<DatasetImpl> currentColorDataset);
128128

129129
private:
130-
ScatterplotPlugin* _scatterplotPlugin; /** Pointer to scatter plot plugin */
131-
ColorSourceModel _colorByModel; /** Color by model (model input for the color by action) */
132-
OptionAction _colorByAction; /** Action for picking the coloring type */
133-
ColorAction _constantColorAction; /** Action for picking the constant color */
134-
DimensionPickerAction _dimensionAction; /** Dimension picker action */
135-
ColorMap1DAction _colorMap1DAction; /** One-dimensional color map action */
136-
ColorMap2DAction _colorMap2DAction; /** Two-dimensional color map action */
137-
Dataset<Points> _currentColorPointsDataset; /** Current color dataset */
130+
ScatterplotPlugin* _scatterplotPlugin; /** Pointer to scatter plot plugin */
131+
ColorSourceModel _colorByModel; /** Color by model (model input for the color by action) */
132+
OptionAction _colorByAction; /** Action for picking the coloring type */
133+
ColorAction _constantColorAction; /** Action for picking the constant color */
134+
DimensionPickerAction _dimensionAction; /** Dimension picker action */
135+
ColorMap1DAction _colorMap1DAction; /** One-dimensional color map action */
136+
ColorMap2DAction _colorMap2DAction; /** Two-dimensional color map action */
137+
Dataset<Points> _currentColorPointsDataset; /** Current color dataset */
138138

139139
/** Default constant color */
140140
static const QColor DEFAULT_CONSTANT_COLOR;

0 commit comments

Comments
 (0)