Skip to content

Commit

Permalink
Display the hkl loop
Browse files Browse the repository at this point in the history
  • Loading branch information
dkratzert committed Sep 28, 2023
1 parent 58a82e7 commit 8f3d4e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
16 changes: 10 additions & 6 deletions finalcif/appwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,8 @@ def resizeEvent(self, a0: QtGui.QResizeEvent) -> None:
if left_frame <= 300:
left_frame = 300
self.ui.LeftFrame.setMinimumWidth(int(left_frame))
threading.Thread(target=self.ui.cif_main_table.resizeRowsToContents).start()
# threading.Thread(target=self.ui.cif_main_table.resizeRowsToContents).start()
QtCore.QTimer(self).singleShot(0, self.ui.cif_main_table.resizeRowsToContents)

def moveEvent(self, a0: QtGui.QMoveEvent) -> None:
"""Is called when the main window moves."""
Expand Down Expand Up @@ -1038,7 +1039,7 @@ def set_checkcif_output_font(self, ccpe: 'QPlainTextEdit') -> None:
font = doc.defaultFont()
font.setFamily("Courier New")
font.setStyleHint(QtGui.QFont.Monospace)
#app.processEvents()
# app.processEvents()
font.setPointSize(14)
doc.setDefaultFont(font)

Expand Down Expand Up @@ -1385,6 +1386,9 @@ def import_loops(self, imp_cif: 'CifContainer'):
if self.ui.importOnlyNewDataCheckBox.isChecked() and self.cif.block.find(loop.tags):
# Import only new loops
continue
# TODO: Make this work:
#if loop.tags[0] in do_not_loop_import:
# continue
new_loop = self.cif.block.init_loop('', loop.tags)
for row in imp_cif.block.find(loop.tags):
new_loop.add_row(row)
Expand Down Expand Up @@ -1843,7 +1847,7 @@ def fill_cif_table(self) -> None:
self.add_row(key, value)
if key == '_audit_creation_method':
self.add_audit_creation_method(key)
#QtCore.QTimer(self).singleShot(200, self.ui.cif_main_table.resizeRowsToContents)
# QtCore.QTimer(self).singleShot(200, self.ui.cif_main_table.resizeRowsToContents)
# print(key, value)
if not self.cif.test_res_checksum():
show_res_checksum_warning(parent=self)
Expand Down Expand Up @@ -1873,13 +1877,13 @@ def add_loops_tables(self) -> None:
"""
Generates a list of tables containing the cif loops.
"""
do_not_display = ('_diffrn_refln_index_h')
#do_not_display = ('_diffrn_refln_index_h')
for num, loop in enumerate(self.cif.loops):
tags = loop.tags
if not tags or len(tags) < 1:
continue
if tags[0] in do_not_display:
continue
#if tags[0] in do_not_display:
# continue
self.new_loop_tab(loop, num, tags)
if self.cif.res_file_data:
self.add_res_file_to_loops()
Expand Down
1 change: 1 addition & 0 deletions finalcif/tools/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ def make_numbered(items):
'_exptl_oxdiff_crystal_face_indexfrac_h': 'Crystal Faces Fractional',
'_platon_squeeze_void_nr' : 'Platon SQUEEZE Voids',
'_smtbx_masks_void_nr' : 'smtbx Solvent Mask',
'_refln_index_h' : 'hkl file',
}

"""
Expand Down

0 comments on commit 8f3d4e4

Please sign in to comment.