Bugfix: when in position lock mode, resizing via mouse wheel will respect the selected position lock.

This commit is contained in:
Lorenz Cuno Klopfenstein 2010-10-17 15:53:57 +02:00
parent 8ad4e78ac5
commit cb4d14778d
2 changed files with 12 additions and 4 deletions

View file

@ -143,10 +143,7 @@ namespace OnTopReplica {
protected override void OnResizeEnd(EventArgs e) {
base.OnResizeEnd(e);
//If locked in position, move accordingly
if (PositionLock.HasValue) {
this.SetScreenPosition(PositionLock.Value);
}
RefreshScreenLock();
}
protected override void OnActivated(EventArgs e) {
@ -177,6 +174,7 @@ namespace OnTopReplica {
if (!IsFullscreen) {
int change = (int)(e.Delta / 6.0); //assumes a mouse wheel "tick" is in the 80-120 range
AdjustSize(change);
RefreshScreenLock();
}
}

View file

@ -108,6 +108,16 @@ namespace OnTopReplica {
}
}
/// <summary>
/// Refreshes window position if in lock mode.
/// </summary>
private void RefreshScreenLock() {
//If locked in position, move accordingly
if (PositionLock.HasValue) {
this.SetScreenPosition(PositionLock.Value);
}
}
#endregion
}