Skip to content

Commit

Permalink
Namecoin: Enable editing CNAME records in DNS dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Dec 12, 2019
1 parent 6ebc0a3 commit 9478871
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions electrum_nmc/electrum/gui/qt/configure_dns_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,22 @@ def edit_selected_record(self):

self.ui.editAHostname.setText(address_data)

for tab_index in range(self.ui.tabRecords.count()):
if self.ui.tabRecords.widget(tab_index) == self.ui.tabA:
self.ui.tabRecords.setTabEnabled(tab_index, True)
self.ui.tabRecords.setCurrentIndex(tab_index)
else:
self.ui.tabRecords.setTabEnabled(tab_index, False)
self.force_one_tab(self.ui.tabA)
elif record_type == "cname":
self.ui.editCNAMEAlias.setText(record_data)

self.force_one_tab(self.ui.tabCNAME)

self.editing_row = row

def force_one_tab(self, tab):
for tab_index in range(self.ui.tabRecords.count()):
if self.ui.tabRecords.widget(tab_index) == tab:
self.ui.tabRecords.setTabEnabled(tab_index, True)
self.ui.tabRecords.setCurrentIndex(tab_index)
else:
self.ui.tabRecords.setTabEnabled(tab_index, False)

def get_records(self):
model = self.ui.listDNSRecords.model()

Expand Down

0 comments on commit 9478871

Please sign in to comment.