Commit 734aeed
committed
hw_wallet/qt: reuse device message dialog across button requests
QtHandlerBase.message_dialog() used to tear down the current dialog
(clear_dialog -> QDialog.accept) and build a brand-new WindowModalDialog
on every device button request. A device emits one button request per
output, so signing a tx with many outputs rebuilt the dialog once per
output. On macOS a window-modal QDialog is shown as an animated "sheet",
so the popup visibly slid closed and reopened for each output, and the
GUI churn also competed with the single hardware-comms thread for the
GIL, adding latency between device prompts.
Reuse the open dialog and just update its label text when one is already
showing (title and on_cancel are stable within a signing flow). This
also smooths Ledger's repeated progress messages, which update the text
on each call.1 parent bb1aaf6 commit 734aeed
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
177 | 188 | | |
178 | 189 | | |
179 | 190 | | |
180 | 191 | | |
181 | 192 | | |
182 | | - | |
| 193 | + | |
| 194 | + | |
183 | 195 | | |
184 | 196 | | |
185 | 197 | | |
| |||
197 | 209 | | |
198 | 210 | | |
199 | 211 | | |
| 212 | + | |
| 213 | + | |
200 | 214 | | |
201 | 215 | | |
202 | 216 | | |
| |||
0 commit comments