mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 05:23:24 -07:00
Code quality fixes (NullReference checks, unused variables etc)
This commit is contained in:
parent
6ab6033f85
commit
ac08533727
99 changed files with 1252 additions and 1312 deletions
|
@ -22,12 +22,16 @@
|
|||
/// <summary>
|
||||
/// See: http://nickstips.wordpress.com/2010/03/03/c-panel-resets-scroll-position-after-focus-is-lost-and-regained/
|
||||
/// </summary>
|
||||
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GreenshotPlugin.Controls {
|
||||
public class NonJumpingPanel : System.Windows.Forms.Panel {
|
||||
protected override System.Drawing.Point ScrollToControl(System.Windows.Forms.Control activeControl) {
|
||||
public class NonJumpingPanel : Panel {
|
||||
protected override Point ScrollToControl(Control activeControl) {
|
||||
// Returning the current location prevents the panel from
|
||||
// scrolling to the active control when the panel loses and regains focus
|
||||
return this.DisplayRectangle.Location;
|
||||
return DisplayRectangle.Location;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue