mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
FEATURE-863: Trying to get it working in 1.2.9
This commit is contained in:
parent
a80e4e2a26
commit
f2f37700b3
11 changed files with 77 additions and 14 deletions
|
@ -20,7 +20,6 @@
|
|||
*/
|
||||
|
||||
using Greenshot.Configuration;
|
||||
using Greenshot.Core;
|
||||
using Greenshot.Drawing.Fields;
|
||||
using Greenshot.Helpers;
|
||||
using Greenshot.IniFile;
|
||||
|
@ -87,6 +86,7 @@ namespace Greenshot.Drawing
|
|||
_movingElementChanged -= value;
|
||||
}
|
||||
}
|
||||
|
||||
[NonSerialized]
|
||||
private SurfaceDrawingModeEventHandler _drawingModeChanged;
|
||||
public event SurfaceDrawingModeEventHandler DrawingModeChanged
|
||||
|
@ -228,6 +228,11 @@ namespace Greenshot.Drawing
|
|||
/// </summary>
|
||||
private readonly List<StepLabelContainer> _stepLabels = new List<StepLabelContainer>();
|
||||
|
||||
/// <summary>
|
||||
/// This value is used to start counting the step labels
|
||||
/// </summary>
|
||||
private int _counterStart = 1;
|
||||
|
||||
public void AddStepLabel(StepLabelContainer stepLabel)
|
||||
{
|
||||
if (!_stepLabels.Contains(stepLabel))
|
||||
|
@ -235,11 +240,28 @@ namespace Greenshot.Drawing
|
|||
_stepLabels.Add(stepLabel);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveStepLabel(StepLabelContainer stepLabel)
|
||||
{
|
||||
_stepLabels.Remove(stepLabel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The start value of the counter objects
|
||||
/// </summary>
|
||||
public int CounterStart
|
||||
{
|
||||
get { return _counterStart; }
|
||||
set
|
||||
{
|
||||
if (_counterStart != value)
|
||||
{
|
||||
_counterStart = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Count all the VISIBLE steplabels in the surface, up to the supplied one
|
||||
/// </summary>
|
||||
|
@ -247,7 +269,7 @@ namespace Greenshot.Drawing
|
|||
/// <returns>number of steplabels before the supplied container</returns>
|
||||
public int CountStepLabels(IDrawableContainer stopAtContainer)
|
||||
{
|
||||
int number = 1;
|
||||
int number = CounterStart;
|
||||
foreach (var possibleThis in _stepLabels)
|
||||
{
|
||||
if (possibleThis.Equals(stopAtContainer))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue