fix regression to restore save pdf button on descriptor qr display dialog
What changed, and why it matters
This commit fixes a user-interface bug where the 'Save PDF' button had disappeared from a dialog that shows a QR code for a wallet descriptor. The change reorders how buttons appear in the dialog's button bar so the Save PDF button is visible again. There is no security issue in the code change itself.
No security action needed; this is a UI regression fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies DescriptorQRDisplayDialog.java to look up the dialog’s ButtonBar and explicitly set its button order to ‘E+L+B+C+O’. This restores the visibility of an existing Save PDF button that was hidden due to a regression in button ordering. The Save PDF action itself is unchanged and was already present in the file.
Changed components
src/main/java/com/sparrowwallet/sparrow/control/DescriptorQRDisplayDialog.javaInspect captured patch +5 / −0
diff --git a/src/main/java/com/sparrowwallet/sparrow/control/DescriptorQRDisplayDialog.java b/src/main/java/com/sparrowwallet/sparrow/control/DescriptorQRDisplayDialog.java
index db4bf1c..7aec6da 100644
--- a/src/main/java/com/sparrowwallet/sparrow/control/DescriptorQRDisplayDialog.java
+++ b/src/main/java/com/sparrowwallet/sparrow/control/DescriptorQRDisplayDialog.java
@@ -23,5 +23,10 @@ public class DescriptorQRDisplayDialog extends QRDisplayDialog {
PdfUtils.saveOutputDescriptor(walletName, outputDescriptor, ur, getEncoding() == QREncoding.BBQR ? bbqr : null);
event.consume();
});
+
+ ButtonBar buttonBar = (ButtonBar)dialogPane.lookup(".button-bar");
+ if(buttonBar != null) {
+ buttonBar.setButtonOrder("E+L+B+C+O");
+ }
}
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.