Changeset 1416 for trunk


Ignore:
Timestamp:
07/24/19 13:23:34 (5 years ago)
Author:
bln4
Message:

Fixed font size of surrogate effecting primary.
Added comment to further document how EncryptionDetail.Type.InheritanceCheckOnSave works.

Location:
trunk/src/org/expeditee
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/encryption/io/EncryptedExpWriter.java

    r1415 r1416  
    203203                boolean userHasKey = Label.getLabel(toWrite.getEncryptionLabel()) == LabelResult.SuccessResolveLabelToKey;
    204204               
     205                // If we have no surrogates that inherit this property from us, and we have the label required to encrypt it, then we should entry it.
    205206                if (!surrogatesInherit && userHasKey) {
    206207                        EncryptionDetail reencryptOnSave = new EncryptionDetail(EncryptionDetail.Type.ReencryptOnSave);
     
    208209                        writeTagReencryptOnSave(toWrite, tags, tag);
    209210                } else {
     211                        // If one or more surrogates still inherit from us, or we do not have the label, then we write it out unencrypted.
    210212                        EncryptionDetail unencryptedOnSave = new EncryptionDetail(EncryptionDetail.Type.UnencryptedOnSave);
    211213                        toWrite.setEncryptionDetailForTag(tag + "", unencryptedOnSave);
  • trunk/src/org/expeditee/items/Text.java

    r1415 r1416  
    22692269        @Override
    22702270        public float getSize() {
    2271                 return getPaintFont().getSize();
     2271                if (isSurrogate() && surrogatePropertyInheritance.get(DefaultFrameWriter.FONT_STR)) {
     2272                        return ((Text) this.getPrimary()).getSize();
     2273                } else {
     2274                        return getPaintFont().getSize();
     2275                }
     2276               
     2277                //return getPaintFont().getSize();
    22722278        }
    22732279
     
    22982304                rebuild(true);
    22992305                invalidateAll();
     2306               
     2307                if (isSurrogate()) {
     2308                        surrogatePropertyInheritance.put(DefaultFrameWriter.FONT_STR, false);
     2309                        Item primary = getPrimary();
     2310                        if (subjectToInheritanceCheckOnSave(DefaultFrameWriter.FONT_STR)) {
     2311                                EncryptionDetail inheritanceCheckOnSave = new EncryptionDetail(EncryptionDetail.Type.InheritanceCheckOnSave);
     2312                                primary.primaryPropertyEncryption.put(DefaultFrameWriter.FONT_STR, inheritanceCheckOnSave);
     2313                        }
     2314                }
    23002315        }
    23012316
Note: See TracChangeset for help on using the changeset viewer.