From 4c7b5aa465609db5631f256fb27e1d3da7f8302a Mon Sep 17 00:00:00 2001 From: cim Date: Sun, 7 Dec 2014 16:23:29 +0000 Subject: [PATCH] Fix some scrolling issues on market screen --- src/Core/Entities/PlayerEntity.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Core/Entities/PlayerEntity.m b/src/Core/Entities/PlayerEntity.m index 6c1d5d7c..5c60db65 100644 --- a/src/Core/Entities/PlayerEntity.m +++ b/src/Core/Entities/PlayerEntity.m @@ -1788,6 +1788,7 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market); [self setMissionBackgroundSpecial:nil]; [self setEquipScreenBackgroundDescriptor:nil]; marketOffset = 0; + DESTROY(marketSelectedCommodity); script_time = 0.0; script_time_check = SCRIPT_TIMER_INTERVAL; @@ -9991,7 +9992,11 @@ static NSString *last_outfitting_key=nil; if (goodsIndex <= marketOffset) { // is off top of list, move list upwards - marketOffset = goodsIndex-1; + if (goodsIndex == 0) { + marketOffset = 0; + } else { + marketOffset = goodsIndex-1; + } } else if (goodsIndex > marketOffset+(GUI_ROW_MARKET_END-GUI_ROW_MARKET_START)-2) { @@ -10005,7 +10010,6 @@ static NSString *last_outfitting_key=nil; } } - // GUI stuff { OOGUIRow start_row = GUI_ROW_MARKET_START;