forked from DotSpatial/DotSpatial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added possibility to snap only to selected layers instead of all
- Loading branch information
1 parent
e181a34
commit fdf6baf
Showing
10 changed files
with
243 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright (c) DotSpatial Team. All rights reserved. | ||
// Licensed under the MIT license. See License.txt file in the project root for full license information. | ||
|
||
using DotSpatial.Symbology; | ||
|
||
namespace DotSpatial.Plugins.ShapeEditor | ||
{ | ||
/// <summary> | ||
/// Class to control layers snappable property through the datagridview. | ||
/// </summary> | ||
public class SnapLayer | ||
{ | ||
#region Fields | ||
|
||
/// <summary> | ||
/// Layer, whose snappable property can be changed. | ||
/// </summary> | ||
private readonly IFeatureLayer _layer; | ||
|
||
#endregion | ||
|
||
#region Constructors | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="SnapLayer"/> class. | ||
/// </summary> | ||
/// <param name="pLayer">Layer, for which the SnapLayer-object gets created.</param> | ||
public SnapLayer(IFeatureLayer pLayer) | ||
{ | ||
_layer = pLayer; | ||
} | ||
|
||
#endregion | ||
|
||
#region Properties | ||
|
||
/// <summary> | ||
/// Gets the layer name so it can be shown in the DataGridView. | ||
/// </summary> | ||
public string LayerName => _layer.LegendText; | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating whether snapping to the coordinates of the layers features is allowed. | ||
/// </summary> | ||
public bool Snappable | ||
{ | ||
get | ||
{ | ||
return _layer.Snappable; | ||
} | ||
|
||
set | ||
{ | ||
_layer.Snappable = value; | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
} |
117 changes: 101 additions & 16 deletions
117
Source/DotSpatial.Plugins.ShapeEditor/SnapSettingsDialog.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters