Fix signing when too small rectangle is selected

Resolves: RHEL-109512
This commit is contained in:
Marek Kasik 2025-10-21 17:13:06 +02:00
parent 5bbbf14e51
commit d02ffcf806
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,44 @@
From fb19401c6024d53929021bd1ad54bd1c0dd850ab Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Thu, 9 Oct 2025 12:19:36 +0200
Subject: [PATCH] shell: Fix signing when the rectangle is too small
Allow user to use the small rectangle for signature instead
of starting over.
---
shell/src/document_view/signals.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/shell/src/document_view/signals.rs b/shell/src/document_view/signals.rs
index 2f3cc6601..f9b5b686d 100644
--- a/shell/src/document_view/signals.rs
+++ b/shell/src/document_view/signals.rs
@@ -775,7 +775,7 @@ impl imp::PpsDocumentView {
#[template_callback]
fn signature_rect_too_small(&self, response: &str) {
if response == "sign" {
- self.create_certificate_selection();
+ self.certificate_save_as_dialog();
return;
}
@@ -837,6 +837,7 @@ impl imp::PpsDocumentView {
self.signature_page.set(page);
self.signature_bounding_box.replace(Some(*rect));
+ signature.set_rect(rect);
// Calculate font size for main (right) signature text
let Some(font_size) = Self::calculate_font_size(
@@ -862,8 +863,6 @@ impl imp::PpsDocumentView {
signature.set_left_font_size(font_size as i32);
- signature.set_rect(rect);
-
self.certificate_save_as_dialog();
}
}
--
2.51.0

View File

@ -58,6 +58,9 @@ Patch: papers-47.0-launch-target-file.patch
# Fix crash during repeated signing
Patch: papers-47.0-fix-wrong-clear.patch
# Fix signing when too small rectangle is selected
Patch: papers-47.0-too-small-rect.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}