From 3af3b0ad336417fd23c0f6aac3582fc7b540380b Mon Sep 17 00:00:00 2001 From: Paul Meems Date: Fri, 1 Mar 2019 11:15:15 +0100 Subject: [PATCH 01/15] Making v5.4.1 --- src/SolutionItems/ReleaseNotes.rtf | 8 +++++--- src/SolutionItems/SolutionInfoCore.cs | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/SolutionItems/ReleaseNotes.rtf b/src/SolutionItems/ReleaseNotes.rtf index 69fe6785..ae24edfd 100644 --- a/src/SolutionItems/ReleaseNotes.rtf +++ b/src/SolutionItems/ReleaseNotes.rtf @@ -1,9 +1,11 @@ {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1043{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset0 Cambria;}{\f2\fnil\fcharset2 Symbol;}} {\colortbl ;\red0\green0\blue255;} {\*\generator Riched20 10.0.17134}\viewkind4\uc1 -\pard\sa200\sl276\slmult1\b\f0\fs44\lang19 Release notes for MapWindow 5\line\b0\fs20 Download at {{\field{\*\fldinst{HYPERLINK https://github.com/MapWindow/MapWindow5/releases }}{\fldrslt{https://github.com/MapWindow/MapWindow5/releases\ul0\cf0}}}}\f0\fs20 (since v5.1.1)\par -\ul\fs44 MW5 v5.4.0\ulnone\line\f1\fs20 Released Jan. 19, 2019\par -\b News\b0 :\line This is a maintenance release. Only a few issues have been resolved.\line The main reason for this release is the new version of MapWinGIS, which has some improvements. v5.0.0 of MapWinGIS is no using the VC++2015 dependencies.\line The release notes for MapWinGIS v5.0.0 can be found at {{\field{\*\fldinst{HYPERLINK https://mapwindow.atlassian.net/secure/ReleaseNote.jspa?projectId=10003&version=10400 }}{\fldrslt{https://mapwindow.atlassian.net/secure/ReleaseNote.jspa?projectId=10003&version=10400\ul0\cf0}}}}\f1\fs20\par +\pard\sa200\sl276\slmult1\b\f0\fs44\lang19 Release notes for MapWindow 5\line\b0\fs20 Download at {{\field{\*\fldinst{HYPERLINK https://github.com/MapWindow/MapWindow5/releases }}{\fldrslt{https://github.com/MapWindow/MapWindow5/releases\ul0\cf0}}}}\f0\fs20 (since v5.1.1)\line\f1 We have a new forum: {{\field{\*\fldinst{HYPERLINK https://mapwindow.discourse.group/ }}{\fldrslt{https://mapwindow.discourse.group/\ul0\cf0}}}}\f0\fs20\par +\ul\fs44 MW5 v5.4.1\ulnone\line\f1\fs20 Released March. 1, 2019\par +\b News\b0 :\line This is a hotfix due to a bug in MapWinGIS: MWGIS-141: \i Crash when selecting a polygon\i0 .\par +\line\ul\f0\fs44 MW5 v5.4.0\ulnone\line\f1\fs20 Released Jan. 19, 2019\par +\b News\b0 :\line This is a maintenance release. Only a few issues have been resolved.\line The main reason for this release is the new version of MapWinGIS, which has some improvements. \line v5.0.0 of MapWinGIS is now using the VC++2015 dependencies.\line The release notes for MapWinGIS v5.0.0 can be found at {{\field{\*\fldinst{HYPERLINK https://mapwindow.atlassian.net/secure/ReleaseNote.jspa?projectId=10003&version=10400 }}{\fldrslt{https://mapwindow.atlassian.net/secure/ReleaseNote.jspa?projectId=10003&version=10400\ul0\cf0}}}}\f1\fs20\par \b\f0\fs28 MW5 Core\line\b0\fs20 URL: {{\field{\*\fldinst{HYPERLINK https://mapwindow.atlassian.net/secure/ReleaseNote.jspa?projectId=10002&version=10500 }}{\fldrslt{https://mapwindow.atlassian.net/secure/ReleaseNote.jspa?projectId=10002&version=10500\ul0\cf0}}}}\f0\fs20\par \b\f1 Bug fixes\b0\par [MW5CORE-211] - WMS url cannot be secure (https)\f0\fs44\par diff --git a/src/SolutionItems/SolutionInfoCore.cs b/src/SolutionItems/SolutionInfoCore.cs index d7998e81..ade8ec02 100644 --- a/src/SolutionItems/SolutionInfoCore.cs +++ b/src/SolutionItems/SolutionInfoCore.cs @@ -26,5 +26,5 @@ // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] -[assembly: AssemblyVersion("5.4.0.*")] -[assembly: AssemblyFileVersion("5.4.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("5.4.1.*")] +[assembly: AssemblyFileVersion("5.4.1.0")] \ No newline at end of file From d1b85a911ea6366f56fc14297b65670508b7c925 Mon Sep 17 00:00:00 2001 From: Mathijs Dumon Date: Fri, 14 Dec 2018 13:10:03 +0100 Subject: [PATCH 02/15] MW5CORE-221 Adding segment/vertex snapping options to the shape editor context menu and toolbar --- .gitignore | 1 + src/MW5.Api/Concrete/GeometryEditor.cs | 8 +- src/MW5.Api/Enums/Enums.cs | 7 + src/MW5.Api/Interfaces/IGeometryEditor.cs | 1 + .../Services/ILayerEditingService.cs | 4 + src/MW5/Helpers/MapInitializer.cs | 1 + .../Context/ContextMenuPresenter.cs | 29 +- .../Context/ContextMenuView.Designer.cs | 268 +++++++++++------- .../Context/ContextMenuView.cs | 36 ++- .../Context/ContextMenuView.resx | 2 +- .../MW5.ShapeEditor/Context/EditorCommand.cs | 4 + .../MW5.ShapeEditor/MW5.ShapeEditor.csproj | 6 + .../MW5.ShapeEditor/Menu/MenuCommands.cs | 6 + .../MW5.ShapeEditor/Menu/MenuGenerator.cs | 18 +- src/Plugins/MW5.ShapeEditor/Menu/MenuKeys.cs | 5 + .../MW5.ShapeEditor/Menu/MenuListener.cs | 87 ++++-- .../MW5.ShapeEditor/Menu/MenuUpdater.cs | 35 ++- .../Properties/Resources.Designer.cs | 42 ++- .../MW5.ShapeEditor/Properties/Resources.resx | 68 +++-- .../Resources/img_snap_active_layer.png | Bin 0 -> 537 bytes .../Resources/img_snap_all_layers.png | Bin 0 -> 1148 bytes .../Resources/img_snap_to_segments.png | Bin 0 -> 588 bytes .../Resources/img_snap_to_vertices.png | Bin 0 -> 235 bytes .../Services/LayerEditingService.cs | 33 +++ src/Plugins/MW5.ShapeEditor/ShapeEditor.cs | 2 +- 25 files changed, 476 insertions(+), 187 deletions(-) create mode 100644 src/Plugins/MW5.ShapeEditor/Resources/img_snap_active_layer.png create mode 100644 src/Plugins/MW5.ShapeEditor/Resources/img_snap_all_layers.png create mode 100644 src/Plugins/MW5.ShapeEditor/Resources/img_snap_to_segments.png create mode 100644 src/Plugins/MW5.ShapeEditor/Resources/img_snap_to_vertices.png diff --git a/.gitignore b/.gitignore index aff3d3be..2ebae767 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.suo *.user *.sln.docstates +.vs/ # Build results diff --git a/src/MW5.Api/Concrete/GeometryEditor.cs b/src/MW5.Api/Concrete/GeometryEditor.cs index dfcbab97..0a056cbe 100644 --- a/src/MW5.Api/Concrete/GeometryEditor.cs +++ b/src/MW5.Api/Concrete/GeometryEditor.cs @@ -47,7 +47,13 @@ public LayerSelectionMode HighlightVertices get { return (LayerSelectionMode)_editor.HighlightVertices; } set { _editor.HighlightVertices = (tkLayerSelection)value; } } - + + public SnapMode SnapMode + { + get { return (SnapMode)_editor.SnapMode; } + set { _editor.SnapMode = (tkSnapMode) value; } + } + public bool IsDigitizing { get { return _editor.IsDigitizing; } diff --git a/src/MW5.Api/Enums/Enums.cs b/src/MW5.Api/Enums/Enums.cs index fb9ddfc8..d24af5fd 100644 --- a/src/MW5.Api/Enums/Enums.cs +++ b/src/MW5.Api/Enums/Enums.cs @@ -902,6 +902,13 @@ public enum LayerSelectionMode ActiveLayer = 2, } + public enum SnapMode + { + Vertices = 0, + VerticesAndLines = 1, + Lines = 2 + } + public enum LengthDisplay { Metric = 0, diff --git a/src/MW5.Api/Interfaces/IGeometryEditor.cs b/src/MW5.Api/Interfaces/IGeometryEditor.cs index 815d448f..360f5930 100644 --- a/src/MW5.Api/Interfaces/IGeometryEditor.cs +++ b/src/MW5.Api/Interfaces/IGeometryEditor.cs @@ -21,6 +21,7 @@ public interface IGeometryEditor: IComWrapper int ShapeIndex { get; } GeometryType GeometryType { get; set; } LayerSelectionMode SnapBehavior { get; set; } + SnapMode SnapMode { get; set; } double SnapTolerance { get; set; } IGeometry ValidatedShape { get; } EditorValidation ValidationMode { get; set; } diff --git a/src/MW5.Plugins/Services/ILayerEditingService.cs b/src/MW5.Plugins/Services/ILayerEditingService.cs index f737574e..4741fb79 100644 --- a/src/MW5.Plugins/Services/ILayerEditingService.cs +++ b/src/MW5.Plugins/Services/ILayerEditingService.cs @@ -5,5 +5,9 @@ public interface ILayerEditingService void ToggleVectorLayerEditing(); bool SaveLayerChanges(int layerHandle); void CreateLayer(); + void ToggleSnapToActiveLayer(); + void ToggleSnapToAllLayers(); + void ToggleSnapToSegments(); + void ToggleSnapToVertices(); } } diff --git a/src/MW5/Helpers/MapInitializer.cs b/src/MW5/Helpers/MapInitializer.cs index 27a93e7f..5a35cb4d 100644 --- a/src/MW5/Helpers/MapInitializer.cs +++ b/src/MW5/Helpers/MapInitializer.cs @@ -92,6 +92,7 @@ public static void Initialize(this IMap map) map.Identifier.HotTracking = true; map.GeometryEditor.HighlightVertices = LayerSelectionMode.NoLayer; map.GeometryEditor.SnapBehavior = LayerSelectionMode.NoLayer; + map.GeometryEditor.SnapMode = SnapMode.VerticesAndLines; map.Identifier.HotTracking = false; map.ResizeBehavior = ResizeBehavior.KeepScale; map.Measuring.UndoButton = UndoShortcut.CtrlZ; diff --git a/src/Plugins/MW5.ShapeEditor/Context/ContextMenuPresenter.cs b/src/Plugins/MW5.ShapeEditor/Context/ContextMenuPresenter.cs index fa6858e2..f4a59cbe 100644 --- a/src/Plugins/MW5.ShapeEditor/Context/ContextMenuPresenter.cs +++ b/src/Plugins/MW5.ShapeEditor/Context/ContextMenuPresenter.cs @@ -4,6 +4,7 @@ using MW5.Plugins.Interfaces; using MW5.Plugins.Mvp; using MW5.Plugins.Services; +using MW5.Plugins.ShapeEditor.Menu; namespace MW5.Plugins.ShapeEditor.Context { @@ -12,8 +13,9 @@ public class ContextMenuPresenter : CommandDispatcher173, 21 - 328, 25 + 332, 24 \ No newline at end of file diff --git a/src/Plugins/MW5.ShapeEditor/Context/EditorCommand.cs b/src/Plugins/MW5.ShapeEditor/Context/EditorCommand.cs index 200cf185..c6c546f2 100644 --- a/src/Plugins/MW5.ShapeEditor/Context/EditorCommand.cs +++ b/src/Plugins/MW5.ShapeEditor/Context/EditorCommand.cs @@ -38,5 +38,9 @@ public enum EditorCommand UndoPoint = 33, FinishShape = 34, CancelShape = 35, + + SnapToVertices = 63, + SnapToLinesAndVertices = 64, + SnapToLines = 65 } } diff --git a/src/Plugins/MW5.ShapeEditor/MW5.ShapeEditor.csproj b/src/Plugins/MW5.ShapeEditor/MW5.ShapeEditor.csproj index e346ae92..68cef8f7 100644 --- a/src/Plugins/MW5.ShapeEditor/MW5.ShapeEditor.csproj +++ b/src/Plugins/MW5.ShapeEditor/MW5.ShapeEditor.csproj @@ -235,6 +235,12 @@ + + + + + +