From 729aa9bc7f519b43de3466297ed85f0ad3643677 Mon Sep 17 00:00:00 2001 From: "torok.istvan" Date: Sun, 21 Jun 2026 14:17:41 +0200 Subject: [PATCH] =?UTF-8?q?Bej=C3=A1r=C3=A1s=20m=C3=B3d:=20pont=20geometri?= =?UTF-8?q?a=20szerkeszt=C3=A9se,=20=C3=BAj=20hely?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/map_survey_controller.dart | 2 +- .../presentations/views/map_survey_view.dart | 9 +++++++-- .../map_edit_point_drawing_content.dart | 20 +++++++++---------- .../map_edit_tools/save_sheet_actions.dart | 2 +- 4 files changed, 19 insertions(+), 14 deletions(-) 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,