stop chart from jumping around as much as it does when selecting system
This commit is contained in:
parent
18a418dbe9
commit
e47dff3eaf
@ -708,8 +708,7 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
|
|||||||
info_system_id = sid;
|
info_system_id = sid;
|
||||||
if (gui_screen == GUI_SCREEN_LONG_RANGE_CHART || gui_screen == GUI_SCREEN_SHORT_RANGE_CHART)
|
if (gui_screen == GUI_SCREEN_LONG_RANGE_CHART || gui_screen == GUI_SCREEN_SHORT_RANGE_CHART)
|
||||||
{
|
{
|
||||||
target_chart_centre = [[UNIVERSE systemManager] getCoordinatesForSystem:info_system_id inGalaxy:galaxy_number];
|
target_chart_focus = [[UNIVERSE systemManager] getCoordinatesForSystem:info_system_id inGalaxy:galaxy_number];
|
||||||
target_chart_focus = target_chart_centre;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1851,8 +1851,9 @@ static NSTimeInterval time_last_frame;
|
|||||||
if (fabs(maus.x - mouse_click_position.x)*MAIN_GUI_PIXEL_WIDTH > 2 ||
|
if (fabs(maus.x - mouse_click_position.x)*MAIN_GUI_PIXEL_WIDTH > 2 ||
|
||||||
fabs(maus.y - mouse_click_position.y)*MAIN_GUI_PIXEL_HEIGHT > 2)
|
fabs(maus.y - mouse_click_position.y)*MAIN_GUI_PIXEL_HEIGHT > 2)
|
||||||
{
|
{
|
||||||
target_chart_centre.x = OOClamp_0_max_f(centre_at_mouse_click.x - (maus.x - mouse_click_position.x)*MAIN_GUI_PIXEL_WIDTH/hscale, 256.0);
|
chart_centre_coordinates.x = OOClamp_0_max_f(centre_at_mouse_click.x - (maus.x - mouse_click_position.x)*MAIN_GUI_PIXEL_WIDTH/hscale, 256.0);
|
||||||
target_chart_centre.y = OOClamp_0_max_f(centre_at_mouse_click.y - (maus.y - mouse_click_position.y)*MAIN_GUI_PIXEL_HEIGHT/vscale, 256.0);
|
chart_centre_coordinates.y = OOClamp_0_max_f(centre_at_mouse_click.y - (maus.y - mouse_click_position.y)*MAIN_GUI_PIXEL_HEIGHT/vscale, 256.0);
|
||||||
|
target_chart_centre = chart_centre_coordinates;
|
||||||
dragging = YES;
|
dragging = YES;
|
||||||
}
|
}
|
||||||
if (gui_screen == GUI_SCREEN_LONG_RANGE_CHART)
|
if (gui_screen == GUI_SCREEN_LONG_RANGE_CHART)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user