File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
src/java/pt/lsts/neptus/console/plugins/planning Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 182182public class PlanEditor extends InteractionAdapter implements Renderer2DPainter ,
183183 MissionChangeListener , ConfigurationListener {
184184
185+ public static boolean exposePlanTemplatesA = true ;
186+
185187 private static final long serialVersionUID = 1L ;
186188 private final String defaultCondition = "ManeuverIsDone" ;
187189 private MissionType mission = null ;
@@ -2515,13 +2517,20 @@ public void missionUpdated(MissionType mission) {
25152517 public void initSubPanel () {
25162518 this .mission = getConsole ().getMission ();
25172519
2518- addMenuItem (I18n .text ("Tools" ) + ">" + I18n .text ("Generate plan..." ), ImageUtils .getIcon ("images/planning/template.png" ), new ActionListener () {
2520+ if (exposePlanTemplatesA ) {
2521+ addMenuItem (I18n .text ("Tools" ) + ">" + I18n .text ("Generate plan..." ), ImageUtils .getIcon ("images/planning/template.png" ), new ActionListener () {
2522+ @ Override
2523+ public void actionPerformed (ActionEvent e ) {
2524+ new PlanTemplatesDialog (getConsole ()).showDialog ();
2525+ }
2526+ });
2527+ }
2528+ }
25192529
2520- @ Override
2521- public void actionPerformed (ActionEvent e ) {
2522- new PlanTemplatesDialog (getConsole ()).showDialog ();
2523- }
2524- });
2530+ @ Override
2531+ public void cleanSubPanel () {
2532+ super .cleanSubPanel ();
2533+ removeMenuItem (I18n .text ("Tools" ) + ">" + I18n .text ("Generate plan..." ));
25252534 }
25262535
25272536 public void updateSelected (Maneuver m ) {
You can’t perform that action at this time.
0 commit comments