From d643cdc95949da57db0f33ac6fc0d2990df78ab5 Mon Sep 17 00:00:00 2001 From: Anton Keks Date: Sun, 25 May 2014 20:42:11 +0300 Subject: [PATCH] try to continue scanning only if the loaded file seems incomplete --- src/net/azib/ipscan/gui/actions/ScanMenuActions.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/net/azib/ipscan/gui/actions/ScanMenuActions.java b/src/net/azib/ipscan/gui/actions/ScanMenuActions.java index 6713aaca..b8a0bde6 100644 --- a/src/net/azib/ipscan/gui/actions/ScanMenuActions.java +++ b/src/net/azib/ipscan/gui/actions/ScanMenuActions.java @@ -93,7 +93,13 @@ public class ScanMenuActions { resultTable.addOrUpdateResultRow(result); } - stateMachine.transitionToNext(); + if (!results.isEmpty()) { + String lastLoadedIP = results.get(results.size()-1).getAddress().getHostAddress(); + String[] feederIPs = feederRegistry.current().serialize(); + if (!lastLoadedIP.equals(feederIPs[1])) + stateMachine.transitionToNext(); // we need to continue previous scan + } + } catch (Exception e) { throw new UserErrorException("fileLoad.failed", e);