Completed the -pl <last pass number> implementation

This commit is contained in:
Andras Fuchs 2020-02-04 20:57:42 +01:00
parent 457b4497c3
commit 625cf4e9ee
3 changed files with 16 additions and 1 deletions

View File

@ -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);

View File

@ -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()
{

View File

@ -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;