Skip to content

Commit

Permalink
Fix bounds limits when resizing windows from bottom left corner
Browse files Browse the repository at this point in the history
  • Loading branch information
magiblot committed Aug 16, 2020
1 parent 1103f82 commit 21377a5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/tvision/tview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,8 @@ void TView::dragView( TEvent& event,
p = s - event.mouse.where;
do {
event.mouse.where += p;
bounds.a.x = event.mouse.where.x;
bounds.a.x = min(max(event.mouse.where.x, bounds.b.x - maxSize.x), bounds.b.x - minSize.x);
bounds.b.y = event.mouse.where.y;
if ( bounds.b.x - bounds.a.x < minSize.x )
bounds.a.x = bounds.b.x - minSize.x;
moveGrow( bounds.a,
bounds.b - bounds.a,
limits,
Expand Down

0 comments on commit 21377a5

Please sign in to comment.