mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
GUI: fix drag to move
This commit is contained in:
parent
2313e4fcc3
commit
d47c50edaf
1 changed files with 13 additions and 0 deletions
|
@ -91,6 +91,19 @@ void FurnaceGUI::updateSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
|||
cursorDrag.xFine=xFine;
|
||||
cursorDrag.y=y;
|
||||
|
||||
int len=dragEnd.xCoarse-dragStart.xCoarse+1;
|
||||
if (len<0) len=0;
|
||||
|
||||
DETERMINE_FIRST_LAST;
|
||||
|
||||
if (dragStart.xCoarse+(dragDestinationX-dragSourceX)<firstChannel) {
|
||||
dragDestinationX=dragSourceX-dragStart.xCoarse;
|
||||
}
|
||||
|
||||
if (dragEnd.xCoarse+(dragDestinationX-dragSourceX)>lastChannel) {
|
||||
|
||||
}
|
||||
|
||||
selStart.xCoarse=dragStart.xCoarse+(dragDestinationX-dragSourceX);
|
||||
selStart.xFine=dragStart.xFine;
|
||||
selStart.y=dragStart.y+(dragDestinationY-dragSourceY);
|
||||
|
|
Loading…
Reference in a new issue