Skip to content

Commit e02f8da

Browse files
committed
Make map movable again with open MarkerWindow
1 parent 960a3ae commit e02f8da

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/src/main/java/de/hauke_stieler/geonotes/map/Map.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ public void setMapScaleFactor(float factor) {
377377
}
378378

379379
private void zoomToLocation(IGeoPoint p, double zoom) {
380-
mapController.setCenter(p);
380+
mapController.setCenter(new GeoPoint(p));
381381
mapController.setZoom(zoom);
382382
}
383383

app/src/main/java/de/hauke_stieler/geonotes/map/MarkerWindow.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ public void afterTextChanged(Editable s) {
9191

9292
// Listen to size changed such that the map can react and move the window
9393
mView.addOnLayoutChangeListener((v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
94-
markerEventHandler.onTextChanged();
94+
if (top - bottom != oldTop - oldBottom || right - left != oldRight - oldLeft) {
95+
markerEventHandler.onTextChanged();
96+
}
9597
});
9698
}
9799

0 commit comments

Comments
 (0)