diff --git a/src/editing/terrain/dialogterrainpainting.ui b/src/editing/terrain/dialogterrainpainting.ui
index fb7a98c..7841d7c 100644
--- a/src/editing/terrain/dialogterrainpainting.ui
+++ b/src/editing/terrain/dialogterrainpainting.ui
@@ -45,6 +45,13 @@
20
+ -
+
+
+ Display :
+
+
+
-
@@ -65,6 +72,16 @@
+ -
+
+
+ Painted area
+
+
+ true
+
+
+
-
@@ -795,6 +812,7 @@
heightmapChanged()
toggleWater(bool)
toggleGrid(bool)
+ togglePaintedArea(bool)
@@ -927,7 +945,7 @@
toggleWater(bool)
- 60
+ 153
43
@@ -943,8 +961,8 @@
toggleGrid(bool)
- 161
- 40
+ 234
+ 43
121
@@ -984,6 +1002,22 @@
+
+ checkBox_3
+ toggled(bool)
+ widget_heightmap
+ togglePaintedArea(bool)
+
+
+ 307
+ 33
+
+
+ 377
+ 519
+
+
+
brushConfigChanged()
diff --git a/src/editing/terrain/widgetheightmap.cpp b/src/editing/terrain/widgetheightmap.cpp
index 299d7b4..3df50dd 100644
--- a/src/editing/terrain/widgetheightmap.cpp
+++ b/src/editing/terrain/widgetheightmap.cpp
@@ -27,6 +27,7 @@ QGLWidget(parent)
_water = true;
_wireframe = true;
+ _painted_area = true;
WaterDefinition* water_definition = (WaterDefinition*)WaterDefinitionClass.create();
sceneryGetWater(water_definition);
_water_height = 0.0;
@@ -103,6 +104,12 @@ void WidgetHeightMap::toggleGrid(bool enabled)
updateGL();
}
+void WidgetHeightMap::togglePaintedArea(bool enabled)
+{
+ _painted_area = enabled;
+ updateGL();
+}
+
void WidgetHeightMap::keyPressEvent(QKeyEvent* event)
{
if (event->key() == Qt::Key_Up)
@@ -409,7 +416,7 @@ void WidgetHeightMap::paintGL()
brush_influence = 0.0;
}
- glColor3f(0.8 + brush_influence, vertex->painted ? 1.0 : 0.8, 0.8);
+ glColor3f(0.8 + brush_influence, (_painted_area && vertex->painted) ? 1.0 : 0.8, 0.8);
glNormal3f(vertex->normal.x, vertex->normal.y, vertex->normal.z);
glVertex3f(vertex->point.x, vertex->point.y, vertex->point.z);
}
diff --git a/src/editing/terrain/widgetheightmap.h b/src/editing/terrain/widgetheightmap.h
index f218e49..b4f87d1 100644
--- a/src/editing/terrain/widgetheightmap.h
+++ b/src/editing/terrain/widgetheightmap.h
@@ -30,6 +30,7 @@ public slots:
void revert();
void toggleWater(bool enabled);
void toggleGrid(bool enabled);
+ void togglePaintedArea(bool enabled);
signals:
void heightmapChanged();
@@ -63,6 +64,7 @@ private:
double _water_height;
bool _water;
bool _wireframe;
+ bool _painted_area;
double _average_frame_time;