|
87 | 87 |
|
88 | 88 | using namespace std::chrono_literals; |
89 | 89 | using std::placeholders::_1; |
90 | | -using std::placeholders::_2; |
91 | 90 |
|
92 | 91 | namespace { |
93 | 92 | constexpr struct { |
@@ -176,6 +175,13 @@ MeshDisplay::MeshDisplay() |
176 | 175 |
|
177 | 176 | // Vertex Costs |
178 | 177 | { |
| 178 | + m_selectVertexCostMap = new rviz_common::properties::EnumProperty("Vertex Costs Type", "-- None --", |
| 179 | + "Select the type of vertex cost map to be displayed. New types " |
| 180 | + "will appear here when a new message arrives.", |
| 181 | + m_displayType, SLOT(updateVertexCosts()), this); |
| 182 | + |
| 183 | + m_selectVertexCostMap->addOption("-- None --", 0); |
| 184 | + |
179 | 185 | m_costColorType = new rviz_common::properties::EnumProperty("Color Scale", "Rainbow", |
180 | 186 | "Select color scale for vertex costs. Mesh will update when new data " |
181 | 187 | "arrives.", |
@@ -210,14 +216,11 @@ MeshDisplay::MeshDisplay() |
210 | 216 | 1 // Min value: This is 1 since we want at least one update per second |
211 | 217 | ); |
212 | 218 |
|
213 | | - m_selectVertexCostMap = new rviz_common::properties::EnumProperty("Vertex Costs Type", "-- None --", |
214 | | - "Select the type of vertex cost map to be displayed. New types " |
215 | | - "will appear here when a new message arrives.", |
216 | | - m_displayType, SLOT(updateVertexCosts()), this); |
217 | | - m_selectVertexCostMap->addOption("-- None --", 0); |
218 | | - |
219 | 219 | m_costUseCustomLimits = new rviz_common::properties::BoolProperty("Use Custom limits", false, "Use custom vertex cost limits", |
220 | 220 | m_displayType, SLOT(updateVertexCosts()), this); |
| 221 | + // Only allow editing of the limits when custom limits are active |
| 222 | + m_costUseCustomLimits->setDisableChildrenIfFalse(true); |
| 223 | + |
221 | 224 |
|
222 | 225 | // custom cost limits |
223 | 226 | { |
@@ -692,11 +695,8 @@ void MeshDisplay::updateDisplayType() |
692 | 695 | m_vertexCostsRefreshRate->show(); |
693 | 696 | m_selectVertexCostMap->show(); |
694 | 697 | m_costUseCustomLimits->show(); |
695 | | - if (m_costUseCustomLimits->getBool()) |
696 | | - { |
697 | | - m_costLowerLimit->show(); |
698 | | - m_costUpperLimit->show(); |
699 | | - } |
| 698 | + m_costLowerLimit->show(); |
| 699 | + m_costUpperLimit->show(); |
700 | 700 | break; |
701 | 701 | } |
702 | 702 |
|
|
0 commit comments