ncssar / radiolog

SAR radio log program
Other
13 stars 3 forks source link

error on accept of CCD whose parent entry dialog has been auto-closed #687

Closed caver456 closed 8 months ago

caver456 commented 9 months ago

On an incoming fleetsync call for a new device, CCD is automatically raised (when that newEntryWidget is activated). If the entry stays blank and is auto-cleaned, the CCD stays open (problem #1). If that CCD is later accepted, this sequence will show up in the transcript, with two different tracebacks (problems #2 and #3):

053404:  closing unused new entry widget for SAR 2 due to inactivity
053410:changeCallsignDialog accept called
053410:accept: FleetSync fleet=100  dev=3002
Traceback (most recent call last):
  File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 7809, in updateTabLabel
    self.parent.newEntryWindow.ui.tabWidget.tabBar().tabButton(i,QTabBar.LeftSide).layout().itemAt(1).widget().setText(time.strftime("%H%M")+" "+self.ui.to_fromField.currentText()+" "+self.ui.teamField.text())
AttributeError: 'NoneType' object has no attribute 'layout'
053410:Writing file C:\Users\caver\RadioLog\New_Incident_2023_10_06_053226\radiolog_fleetsync.csv
053410:calling fsLogUpdate for fleetsync
053410:updating fsLog (fleetsync): fleet=100 dev=3002 callsign=Team  COM port=COM2
053410:New callsign pairing created from FleetSync: fleet=100  dev=3002  callsign=Team
Traceback (most recent call last):
  File "C:\Users\caver\Documents\GitHub\radiolog\radiolog.py", line 9040, in accept
    self.parent.parent.newEntryWindow.ui.tabWidget.currentWidget().ui.messageField.setFocus()
AttributeError: 'QWidget' object has no attribute 'ui'

This was found in transcript from Castle Peak May 5 2023.

Actions to take:

part 1:

part 2 - consider whether any of this part is necessary - maybe it's OK to close a modified CCD if its parent is auto-cleaned

caver456 commented 8 months ago

don't try part 2 for now, since it might be fairly invasive, would be rarely used, and is easy enough to recover from in the event that a modified CCD is auto-closed because its parent message text was blank.