Ruberband selection now works better.

This commit is contained in:
Justin Marshall
2020-07-06 16:20:36 -07:00
parent f1e75e4a63
commit f4964c83e9
2 changed files with 21 additions and 7 deletions
+9 -2
View File
@@ -3298,7 +3298,7 @@ int DisplayClass::TacticalClass::Action(unsigned flags, KeyNumType & key)
** intercepted and possible rubber-band mode is flagged.
*/
if (flags & LEFTRELEASE) {
Map.Mouse_Left_Release(cell, x, y, object, action);
Map.Mouse_Left_Release(cell, screenX, screenY, object, action);
}
/*
@@ -3886,7 +3886,14 @@ void DisplayClass::Mouse_Left_Release(CELL cell, int x, int y, ObjectClass * obj
if (IsRubberBand) {
Refresh_Band();
Select_These(XYP_Coord(BandX, BandY), XYP_Coord(x, y));
int _BandX = BandX;
int _BandY = BandY;
int _x = x;
int _y = y;
CellClass::ConvertIsoCoordsToScreen(_BandX, _BandY);
CellClass::ConvertIsoCoordsToScreen(_x, _y);
Select_These(XYP_Coord(_BandX, _BandY), XYP_Coord(_x, _y));
Set_Default_Mouse(MOUSE_NORMAL, wsmall);
IsRubberBand = false;