mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-05-20 20:33:06 +12:00
Bug fix for 0x0 pixels region selection.
This commit is contained in:
parent
07b4db4666
commit
9500596982
|
@ -393,8 +393,13 @@ namespace OnTopReplica {
|
|||
public event RegionDrawnHandler RegionDrawn;
|
||||
|
||||
protected virtual void OnRegionDrawn(Rectangle region) {
|
||||
if (RegionDrawn != null)
|
||||
RegionDrawn(this, region);
|
||||
//Fix region if necessary (bug report by Gunter, via comment)
|
||||
if (region.Width < 1) region.Width = 1;
|
||||
if (region.Height < 1) region.Height = 1;
|
||||
|
||||
var evt = RegionDrawn;
|
||||
if (evt != null)
|
||||
evt(this, region);
|
||||
}
|
||||
|
||||
protected Point ScreenToThumbnail(Point position) {
|
||||
|
|
Loading…
Reference in a new issue