Skip to content

Commit

Permalink
Fixed snapping for interactive resizing of right and bottom border.
Browse files Browse the repository at this point in the history
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4550 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Matthias Melcher committed Aug 29, 2005
1 parent 8c479b5 commit e9ba94e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fluid/Fl_Window_Type.cxx
Expand Up @@ -703,7 +703,8 @@ void Fl_Window_Type::draw_overlay() {
// - check for distance to the window edge
// * FLTK suggests 10 pixels from the edge
int d;
int xsp, ysp, mybx_bak = mybx, myby_bak = myby;
int xsp, ysp;
int mybx_bak = mybx, myby_bak = myby, mybr_bak = mybr, mybt_bak = mybt;
Fl_Widget_Type *mysel = (Fl_Widget_Type *)selection;


Expand Down Expand Up @@ -981,8 +982,8 @@ void Fl_Window_Type::draw_overlay() {
}
}
}
mysx += mybx-mybx_bak; mysr += mybx-mybx_bak;
mysy += myby-myby_bak; myst += myby-myby_bak;
mysx += mybx-mybx_bak; mysr += mybr-mybr_bak;
mysy += myby-myby_bak; myst += mybt-mybt_bak;
}
// align the snapping selection box with the box we draw.
sx = mysx; sy = mysy; sr = mysr; st = myst;
Expand Down

0 comments on commit e9ba94e

Please sign in to comment.