I thought it was interesting. I was exploring Ring Notepad, and I noticed that there was a save dialog box in the taskbar thumbnail that would show up on the middle of my screen, too, when hovered over, which was from a previous Qmessagebox.
At first, I thought it was due to my modifications, so I checked on the original notepad, and it does the same. If you open the notepad, change the file on noname tab, then open up another file without saving it when the dialog pops up, you will notice a latent image on screen when you hover over the taskbar thumbnail.
It will remain there for a while. Then it disappears.
This is the code for the dialog
if lAsktoSave and cTextHash != sha256(textedit1.toplaintext())
new qmessagebox(win1)
{
setwindowtitle(T_RINGNOTEPAD_SAVECHANGES) # "Save Changes?"
settext(T_RINGNOTEPAD_SOMECHANGESNOTSAVED) # "Some changes are not saved!"
setInformativeText(T_RINGNOTEPAD_DOYOUWANTTOSAVECHANGES) # "Do you want to save your changes?"
setstandardbuttons(QMessageBox_Yes | QMessageBox_No)
result = exec()
this.win1 {
if result = QMessageBox_Yes
this.Save()
but result = QMessageBox_Cancel
return false
ok
}
}
However, if you put qmessagebox into a variable and call qbox.deletelater(), the latent image will disappear.
if lAsktoSave and cTextHash != sha256(textedit1.toplaintext())
qbox = new qmessagebox(win1)
{
setwindowtitle(T_RINGNOTEPAD_SAVECHANGES) # "Save Changes?"
settext(T_RINGNOTEPAD_SOMECHANGESNOTSAVED) # "Some changes are not saved!"
setInformativeText(T_RINGNOTEPAD_DOYOUWANTTOSAVECHANGES) # "Do you want to save your changes?"
setstandardbuttons(QMessageBox_Yes | QMessageBox_No)
result = exec()
this.win1 {
if result = QMessageBox_Yes
this.Save()
but result = QMessageBox_Cancel
return false
ok
}
}
qbox.deletelater()
I thought it was interesting that the prompt remains active when you hover over the thumbnail if you don't explicitly deletelater it and assign it to a var.
It goes away eventually, but when you transfer between windows through the taskbar, it's annoying to see that prompt over and over again, so I thought I would throw out the suggested fix.
Here is a screenshot of the latent dialog I'm referring to:
Thx.