Skip to content

Commit

Permalink
Merge pull request #1144 from Ragin-LundF/bugfix/newcustomconfirm_cal…
Browse files Browse the repository at this point in the history
…lback_fix_1143

Fixes #1143
  • Loading branch information
andydotxyz committed Jun 27, 2020
2 parents ebb8181 + a4e589e commit 91c3a1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dialog/base.go
Expand Up @@ -186,6 +186,10 @@ func NewCustomConfirm(title, confirm, dismiss string, content fyne.CanvasObject,
callback func(bool), parent fyne.Window) Dialog {
d := &dialog{content: content, title: title, icon: nil, parent: parent}
d.callback = callback
// TODO: This is required to avoid confusion.
// Normally this function should only provide the dialog, but currently it is also displayed, which is wrong.
// For this case the ShowCustomConfirm() method was built.
d.sendResponse = true

d.dismiss = &widget.Button{Text: dismiss, Icon: theme.CancelIcon(),
OnTapped: d.Hide,
Expand Down

0 comments on commit 91c3a1e

Please sign in to comment.