ncssar / radiolog

SAR radio log program
Other
15 stars 3 forks source link

prevent duplicate new entry dialog due to continue time expiration for teams that have a clue or subject form open #742

Closed caver456 closed 3 months ago

caver456 commented 3 months ago

from #737:

(first identified issue) 1) new tabs are being opened when existing tab is already open but has lastModAge > continueSec; this is probably because keystrokes into the subject located or clue dialog don't reset lastModAge of the parent NED; lastModAge of parent NED should be placed on hold (-1) when a clue or subject dialog is opened; thought this was already happening...?

Apparently this was an introduced bug in Oct. 2023, from #683, commit 48ea565

caver456 commented 3 months ago

in class newEntryWidget:

    def updateTimer(self):
        # # pause all timers if there are any clue or subject or changeCallsign dialogs open
        # if clueDialog.openDialogCount==0 and subjectLocatedDialog.openDialogCount==0 and changeCallsignDialog.openDialogCount==0:
        #   self.lastModAge+=1
        #683 - don't pause timers, but do prevent auto-cleanup, if there are child dialog(s)
        self.lastModAge+=1

The comment is clear that the pausing was disabled - but, why? Apparently we needed to preserve the lastModAge? Reading #683 didn't reveal the exact reason.

caver456 commented 3 months ago

Added code in the part of fsParse that determines whether a 'matching' new entry widget is found (from same callsign, using case-insensitive and spaces-removed comparison): previous logic only checked for lastModAge<continueSec; add logic to also check for newEntryWidget.childDialogs; log a corresponding message as to which of those criteria was met.

Would like to test in R6 before merging, since the newEntryWindowHiddenPopup can obscure things, and triggers every time fsTester is clicked during development.

caver456 commented 3 months ago

Tested in R6. Looks good - moving forward with merge and patch release. The testing also turned up some new questions, potentially related to this one, but all would arguably be enhancements rather than bug fixes, so, moving forward.