Adding a Text item turns off the base plan lock

by digitaltrails » Wed Mar 27, 2019 3:52 am

I was trying to understand the code around adding Text items. It always unlocks the base plan due to newBasePlanLocked always being false because !isLabelPartOfBasePlan() is always false:

Code: Select all

      boolean newBasePlanLocked = basePlanLocked && !isLabelPartOfBasePlan(label);
     doAddLabel(this.home, label, newBasePlanLocked); 


and

Code: Select all

    protected boolean isLabelPartOfBasePlan(Label label) {
    return true;
  }
Is adding Text always supposed to unlock the base plan and leave it unlocked?