Skip to content

Commit

Permalink
Fix post rdp form connect
Browse files Browse the repository at this point in the history
  • Loading branch information
gounux committed Apr 13, 2024
1 parent 912c16e commit d80ed29
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions qtribu/gui/dlg_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ def submit_news(self) -> None:
self.form_rdp_news.finished.connect(self._post_form_rdp_news)
self.form_rdp_news.show()

def _post_form_rdp_news(self, dialog_result: int) -> None:
"""Perform actions after the GeoRDP news form has been closed.
:param dialog_result: dialog's result code. Accepted (1) or Rejected (0)
:type dialog_result: int
"""
if self.form_rdp_news:
# if accept button, save user inputs
if dialog_result == 1:
self.form_rdp_news.wdg_author.save_settings()
# clean up
self.form_rdp_news.deleteLater()
self.form_rdp_news = None

def donate(self) -> None:
open_url_in_browser("https://geotribu.fr/team/sponsoring/")

Expand Down

0 comments on commit d80ed29

Please sign in to comment.