comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java @ 8447:4b315e5d2d4f

(issue1733) Remove weird and broken code (fixes tab selection) This code did not make any sense to me. Why should the tabs be removed and readded. Just selecting them works.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 27 Oct 2014 12:38:22 +0100
parents 75b84f139c1b
children e98dbf72c9ec
comparison
equal deleted inserted replaced
8446:75b84f139c1b 8447:4b315e5d2d4f
1189 enableLocationPanel(); 1189 enableLocationPanel();
1190 filterDescription.clear(); 1190 filterDescription.clear();
1191 filterRange.clear(); 1191 filterRange.clear();
1192 filterResultCount.setValue(""); 1192 filterResultCount.setValue("");
1193 1193
1194 // Remove the tab containing the locationDistanceTable.
1195 // The 'updateTab()' avoids the tab content to be destroyed.
1196 inputTables.updateTab(0, null);
1197 inputTables.removeTab(0);
1198
1199 // Create a new tab containing the locationTable
1200 Tab t1 = new Tab (MESSAGES.locations());
1201 t1.setPane(locationsTable);
1202 inputTables.addTab(t1, 0);
1203
1204 // Bring this tab to front. 1194 // Bring this tab to front.
1205 inputTables.selectTab(0); 1195 inputTables.selectTab(0);
1206 } 1196 }
1207 else { 1197 else {
1208 event.getItem().setValue(FIELD_VALUE_DISTANCE); 1198 event.getItem().setValue(FIELD_VALUE_DISTANCE);
1209 enableDistancePanel(); 1199 enableDistancePanel();
1210 filterDescription.clear(); 1200 filterDescription.clear();
1211 filterRange.clear(); 1201 filterRange.clear();
1212 filterResultCount.setValue(""); 1202 filterResultCount.setValue("");
1213
1214 // Remove the tab containing the locationTable.
1215 // The 'updateTab()' avoids the tab content to be destroyed.
1216 inputTables.updateTab(0, null);
1217 inputTables.removeTab(0);
1218
1219 // Create a new tab containing the locationDistanceTable.
1220 Tab t1 = new Tab(MESSAGES.locations());
1221 t1.setPane(locationDistanceTable);
1222 inputTables.addTab(t1, 0);
1223 1203
1224 // Bring the distanceTable tab to front. 1204 // Bring the distanceTable tab to front.
1225 inputTables.selectTab(1); 1205 inputTables.selectTab(1);
1226 } 1206 }
1227 } 1207 }

http://dive4elements.wald.intevation.org