diff --git a/src/main/java/eu/mihosoft/freerouting/autoroute/BatchAutorouter.java b/src/main/java/eu/mihosoft/freerouting/autoroute/BatchAutorouter.java index 50b3f3a..0740d15 100644 --- a/src/main/java/eu/mihosoft/freerouting/autoroute/BatchAutorouter.java +++ b/src/main/java/eu/mihosoft/freerouting/autoroute/BatchAutorouter.java @@ -132,6 +132,11 @@ public class BatchAutorouter } Integer curr_pass_no = hdlg.get_settings().autoroute_settings.get_start_pass_no(); + if (curr_pass_no > hdlg.get_settings().autoroute_settings.get_stop_pass_no()) + { + break; + } + String start_message = resources.getString("batch_autorouter") + " " + resources.getString("stop_message") + " " + resources.getString("pass") + " " + curr_pass_no.toString() + ": "; hdlg.screen_messages.set_status_message(start_message); diff --git a/src/main/java/eu/mihosoft/freerouting/gui/MainApplication.java b/src/main/java/eu/mihosoft/freerouting/gui/MainApplication.java index 2f9d5cc..9f666ff 100644 --- a/src/main/java/eu/mihosoft/freerouting/gui/MainApplication.java +++ b/src/main/java/eu/mihosoft/freerouting/gui/MainApplication.java @@ -102,7 +102,12 @@ public class MainApplication extends javax.swing.JFrame new_frame.board_panel.board_handling.settings.autoroute_settings.set_start_pass_no(startupOptions.pass_number_first); new_frame.board_panel.board_frame.autoroute_parameter_window.refresh(); } + new_frame.board_panel.board_handling.settings.autoroute_settings.set_stop_pass_no(startupOptions.pass_number_last); + if (startupOptions.pass_number_last < 99999) + { + new_frame.board_panel.board_handling.start_batch_autorouter(); + } new_frame.addWindowListener(new java.awt.event.WindowAdapter() { diff --git a/src/main/java/eu/mihosoft/freerouting/interactive/AutorouteSettings.java b/src/main/java/eu/mihosoft/freerouting/interactive/AutorouteSettings.java index 2b84efe..cc46ebe 100644 --- a/src/main/java/eu/mihosoft/freerouting/interactive/AutorouteSettings.java +++ b/src/main/java/eu/mihosoft/freerouting/interactive/AutorouteSettings.java @@ -148,10 +148,15 @@ public class AutorouteSettings implements java.io.Serializable public void set_stop_pass_no(int p_value) { - stop_pass_no = Math.max(p_value, 1); + stop_pass_no = Math.max(p_value, start_pass_no); stop_pass_no = Math.min(stop_pass_no, 99999); } + public int get_stop_pass_no() + { + return stop_pass_no; + } + public void increment_pass_no() { ++start_pass_no;