Remove unused features in terrain painting dialog

This commit is contained in:
Michaël Lemaire 2013-06-20 17:45:26 +02:00
parent a76853c237
commit 110d16e0b6
4 changed files with 45 additions and 78 deletions

View file

@ -12,6 +12,9 @@ DialogTerrainPainting::DialogTerrainPainting(QWidget*parent, TerrainDefinition*
{
ui->setupUi(this);
// TEMP
ui->brush_preview->hide();
_terrain_original = terrain;
_terrain_modified = (TerrainDefinition*)TerrainDefinitionClass.create();
@ -43,12 +46,8 @@ void DialogTerrainPainting::keyReleaseEvent(QKeyEvent* event)
ui->input_brush_mode->setCurrentIndex(2);
event->accept();
break;
case Qt::Key_F11:
ui->input_brush_mode->setCurrentIndex(3);
event->accept();
break;
case Qt::Key_F12:
ui->input_brush_mode->setCurrentIndex(4);
ui->input_brush_mode->setCurrentIndex(3);
event->accept();
break;
default:

View file

@ -236,22 +236,6 @@
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_14">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>F11</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_11">
<property name="text">
@ -272,17 +256,7 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Switch to magix fix tool</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="5" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label_16">
<property name="font">
<font>
@ -298,7 +272,7 @@
</property>
</widget>
</item>
<item row="5" column="1">
<item row="4" column="1">
<widget class="QLabel" name="label_17">
<property name="text">
<string>Switch to restore tool</string>
@ -570,11 +544,6 @@
<string>Flatten terrain (F4)</string>
</property>
</item>
<item>
<property name="text">
<string>Fix discontinuities (F11)</string>
</property>
</item>
<item>
<property name="text">
<string>Restore to default (F12)</string>
@ -679,7 +648,8 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<widget class="QWidget" name="brush_preview" native="true">
<layout class="QHBoxLayout" name="container_brush_preview">
<property name="topMargin">
<number>8</number>
</property>
@ -714,6 +684,7 @@
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">

View file

@ -90,8 +90,6 @@ QString PaintingBrush::getHelpText()
return QObject::tr("<strong>Left click</strong>: add random noise to terrain<br><br><strong>Right click</strong>: smooth details");
case PAINTING_BRUSH_FLATTEN:
return QObject::tr("<strong>Left click</strong>: flatten at height picked with right click<br><br><strong>Right click</strong>: pick height at center");
case PAINTING_BRUSH_FIX_DISCONTINUITIES:
return QObject::tr("<strong>Left click</strong>: fix discontinuities in slope");
case PAINTING_BRUSH_RESTORE:
return QObject::tr("<strong>Left click</strong>: cancel all modifications on terrain");
}
@ -127,7 +125,7 @@ void PaintingBrush::applyToTerrain(TerrainDefinition* terrain, double x, double
}
else
{
terrainBrushAddNoise(terrain->height_map, &brush, _noise, brush_strength * 0.5);
terrainBrushAddNoise(terrain->height_map, &brush, _noise, brush_strength * 0.3);
}
break;
case PAINTING_BRUSH_FLATTEN:

View file

@ -10,8 +10,7 @@ typedef enum
PAINTING_BRUSH_RAISE = 0,
PAINTING_BRUSH_SMOOTH = 1,
PAINTING_BRUSH_FLATTEN = 2,
PAINTING_BRUSH_FIX_DISCONTINUITIES = 3,
PAINTING_BRUSH_RESTORE = 4
PAINTING_BRUSH_RESTORE = 3
} PaintingBrushMode;
class PaintingBrush