diff --git a/lib/pages/map_survey/presentations/controllers/map_survey_controller.dart b/lib/pages/map_survey/presentations/controllers/map_survey_controller.dart index 770e3b5..abac060 100644 --- a/lib/pages/map_survey/presentations/controllers/map_survey_controller.dart +++ b/lib/pages/map_survey/presentations/controllers/map_survey_controller.dart @@ -1075,7 +1075,7 @@ class MapSurveyController extends GetxController { String get activeEditToolHint { switch (activeEditTool.value) { case MapEditTool.point: - return 'Koppints a térképre a pont helyéhez.'; + return 'Hosszan nyomj a térképre a pont helyéhez.'; case MapEditTool.line: return 'Hosszan nyomj a térképre a töréspontokhoz'; case MapEditTool.polygon: diff --git a/lib/pages/map_survey/presentations/views/map_survey_view.dart b/lib/pages/map_survey/presentations/views/map_survey_view.dart index 38458d9..0afa66d 100644 --- a/lib/pages/map_survey/presentations/views/map_survey_view.dart +++ b/lib/pages/map_survey/presentations/views/map_survey_view.dart @@ -51,8 +51,13 @@ class MapSurveyView extends GetView { onCenterOnGps: controller.setIsMapMoveToCenter, onLongPress: (tapPosition, point) { if (controller.activeEditTool.value == MapEditTool.point) { - //controller.saveEditedPoint(point: point); - controller.showSavePointDialog(point: point); + if (controller.isGeometryEditing) { + controller.saveEditedPoint(point: point); + } else { + //controller.saveEditedPoint(point: point); + controller.showSavePointDialog(point: point); + } + return; } if (controller.activeEditTool.value == MapEditTool.line || controller.activeEditTool.value == MapEditTool.polygon) { diff --git a/lib/widgets/map_edit_tools/map_edit_point_drawing_content.dart b/lib/widgets/map_edit_tools/map_edit_point_drawing_content.dart index 7f5ee23..aa5957b 100644 --- a/lib/widgets/map_edit_tools/map_edit_point_drawing_content.dart +++ b/lib/widgets/map_edit_tools/map_edit_point_drawing_content.dart @@ -20,7 +20,8 @@ class PointDrawingContent extends StatelessWidget { return Obx(() { // final hasPoint = controller.draftPoints.isNotEmpty; - final hasPoint = true; + //final hasPoint = true; + final isEditing = controller.isGeometryEditing; return Column( mainAxisSize: MainAxisSize.min, @@ -35,8 +36,8 @@ class PointDrawingContent extends StatelessWidget { const SizedBox(width: 8), Expanded( child: Text( - hasPoint - ? 'Pont kiválasztva' + isEditing + ? 'Pont szerkesztése' : controller.activeEditToolTitle, maxLines: 1, overflow: TextOverflow.ellipsis, @@ -45,19 +46,18 @@ class PointDrawingContent extends StatelessWidget { ), ), ), - if (hasPoint) - SmallStatusChip( - text: '1 pont', - color: colorScheme.primary, - ), + SmallStatusChip( + text: '1 pont', + color: colorScheme.primary, + ), ], ), const SizedBox(height: 5), Align( alignment: Alignment.centerLeft, child: Text( - hasPoint - ? 'A pont helye kijelölve. A mentéshez nyomd meg a Kész gombot.' + isEditing + ? 'Hosszan nyomj a térképen az új helyre.' : controller.activeEditToolHint, maxLines: 2, overflow: TextOverflow.ellipsis, diff --git a/lib/widgets/map_edit_tools/save_sheet_actions.dart b/lib/widgets/map_edit_tools/save_sheet_actions.dart index 259165c..32f9f17 100644 --- a/lib/widgets/map_edit_tools/save_sheet_actions.dart +++ b/lib/widgets/map_edit_tools/save_sheet_actions.dart @@ -53,7 +53,7 @@ class SaveSheetActions extends StatelessWidget { ), ) ]), - if (isEditing && !isPoint) ...[ + if (isEditing) ...[ const SizedBox(height: 8), SizedBox( width: double.infinity,