Index: /applications/editors/josm/plugins/waypoint_search/build.xml
===================================================================
--- /applications/editors/josm/plugins/waypoint_search/build.xml	(revision 23179)
+++ /applications/editors/josm/plugins/waypoint_search/build.xml	(revision 23180)
@@ -31,5 +31,5 @@
 
     <!-- enter the SVN commit message -->
-    <property name="commit.message" value="better integration wih JOSM gui" />
+    <property name="commit.message" value="bugfix of search when layer is added" />
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     <property name="plugin.main.version" value="3514" />
Index: /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/SelectWaypointDialog.java
===================================================================
--- /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/SelectWaypointDialog.java	(revision 23179)
+++ /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/SelectWaypointDialog.java	(revision 23180)
@@ -64,11 +64,8 @@
     
 	public void updateSearchResults(){
-		String searchfor;
+		String searchfor = "";
 		listModel.clear();
 		SearchResultObjectCache.clear();
-		if (first_time_search) {
-			searchfor = "";
-			first_time_search = false;
-		} else {
+		if (!first_time_search) {
 			searchfor = searchPattern.getText();
 		}
@@ -96,5 +93,5 @@
 	@Override
 	public void keyTyped(KeyEvent arg0) {
-		// TODO Auto-generated method stub
+		first_time_search = false;
 	}
 
Index: /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/WaypointSearchPlugin.java
===================================================================
--- /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/WaypointSearchPlugin.java	(revision 23179)
+++ /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/WaypointSearchPlugin.java	(revision 23180)
@@ -36,5 +36,5 @@
 			Main.map.addToggleDialog(waypointDialog);
 		}
-		//Enable to menu
+		//update search
 		if (engine.gpxLayersExist()) {
 			waypointDialog.updateSearchResults();
