qt preferences: fix "allow_instant_swaps" checkbox

This commit is contained in:
SomberNight
2022-05-07 16:20:16 +02:00
parent 2022b2e341
commit 2e99ac9a94

View File

@@ -174,7 +174,7 @@ class SettingsDialog(QDialog):
])
instant_swaps_cb = QCheckBox(_("Allow instant swaps"))
instant_swaps_cb.setToolTip(messages.to_rtf(help_instant_swaps))
instant_swaps_cb.setChecked(not bool(self.config.get('allow_instant_swaps', False)))
instant_swaps_cb.setChecked(bool(self.config.get('allow_instant_swaps', False)))
def on_instant_swaps_checked(allow_instant_swaps):
self.config.set_key('allow_instant_swaps', bool(allow_instant_swaps))
instant_swaps_cb.stateChanged.connect(on_instant_swaps_checked)