Changeset 1422 for trunk


Ignore:
Timestamp:
07/31/19 12:15:08 (5 years ago)
Author:
bln4
Message:

Setting an encryption label on a @i annotation generates a surrogate with redacted as the image filename

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/Item.java

    r1418 r1422  
    40354035       
    40364036        public void setEncryptionLabel(String label) {
     4037                this.getSurrogates().clear();
     4038                this._encryptionLabel = label;
     4039               
    40374040                if (this.getParent().getEncryptionLabel() == null) {
    40384041                        MessageBay.displayMessage("Items can only be entrypted if the frame they are on is.");
     
    40424045                if (labelResult != LabelResult.SuccessResolveLabelToKey) {
    40434046                        MessageBay.displayMessage(labelResult.toString());
     4047                        this._encryptionLabel = null;
    40444048                        return;
    40454049                }
    40464050               
    4047                 this._encryptionLabel = label;
    4048                 this.getSurrogates().clear();
    40494051                Item copy = this.copy();
    4050                 if (copy instanceof Text) {     copy.setText("Encrypted"); }
     4052                if (copy.isAnnotation()) {
     4053                        if (ItemUtils.startsWithTag(copy, ItemUtils.TAG_IMAGE, true)) {
     4054                                copy.setText(ItemUtils.GetTag(ItemUtils.TAG_IMAGE) + ": redacted.png");
     4055                                copy.setVisible(true);
     4056                        }
     4057                } else if (copy instanceof Text) {
     4058                        copy.setText("Encrypted");
     4059                }
    40514060                this.addToSurrogates(copy);
    40524061        }
Note: See TracChangeset for help on using the changeset viewer.