Skip to content

Commit

Permalink
Hide delete loop button in new loop view
Browse files Browse the repository at this point in the history
  • Loading branch information
dkratzert committed Feb 13, 2024
1 parent 0ec1c83 commit 32d85b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions finalcif/appwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,7 @@ def back_to_main(self):
self.ui.cif_main_table.scrollToTop()
self.ui.TemplatesStackedWidget.setCurrentIndex(0)
self.ui.cif_main_table.resizeRowsToContents()
self.ui.revertLoopsPushButton.show()
self.ui.newLoopPushButton.show()
self._show_loop_buttons()

def back_to_main_noload(self) -> None:
"""
Expand All @@ -825,8 +824,12 @@ def back_to_main_noload(self) -> None:
self.status_bar.show_message('')
self.ui.TemplatesStackedWidget.setCurrentIndex(0)
self.ui.MainStackedWidget.got_to_main_page()
self._show_loop_buttons()

def _show_loop_buttons(self):
self.ui.revertLoopsPushButton.show()
self.ui.newLoopPushButton.show()
self.ui.deleteLoopButton.show()

def _checkcif_failed(self, txt: str):
self.ui.CheckCifLogPlainTextEdit.appendHtml('<b>{}</b>'.format(txt))
Expand Down Expand Up @@ -1914,6 +1917,7 @@ def _go_to_new_loop_page(self):
self.ui.LoopsTabWidget.setCurrentIndex(self.ui.LoopsTabWidget.count() - 1)
self.ui.revertLoopsPushButton.hide()
self.ui.newLoopPushButton.hide()
self.ui.deleteLoopButton.hide()
self.loopcreate.saveLoopPushButton.clicked.connect(self.save_new_loop_to_cif)

def _on_delete_current_loop(self):
Expand Down

0 comments on commit 32d85b2

Please sign in to comment.