Skip to content

Commit

Permalink
checking highlights for any combinaison. This refs #134
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Apr 16, 2019
1 parent c56d64a commit 4daf64c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -540,3 +540,4 @@ def accept(self):
self.parent.ascii_loader_option = self.get_option_selected()
self.real_parent.import_into_master_table()
self.close()
self.parent.check_master_table_column_highlighting()
2 changes: 2 additions & 0 deletions addie/processing/mantid/master_table/master_table_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ def display_dialog(self):
else:
raise IOError("File format not supported!".format(self.filename))

self.parent.check_master_table_column_highlighting()

except ValueError:
self.parent.ui.statusbar.setStyleSheet("color: red")
self.parent.ui.statusbar.showMessage("Unable to load configuration file {}!".format(self.filename),
Expand Down
7 changes: 6 additions & 1 deletion addie/processing/mantid/master_table/table_tree_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
import pickle

from qtpy.QtWidgets import QDialog, QTreeWidgetItem, QTableWidgetItem, QMenu, QFileDialog
from qtpy.QtWidgets import QDialog, QTreeWidgetItem, QTableWidgetItem, QMenu, QFileDialog, QApplication
from addie.utilities import load_ui
from qtpy import QtCore, QtGui

Expand Down Expand Up @@ -792,13 +792,16 @@ def _import_table_from_file(self, clear_table=True):
self.main_window.current_folder = new_path
if clear_table:
self.clear_table()
# fixme

def _import_table_from_config(self, clear_table=True):
_current_folder = self.main_window.current_folder
[table_file, _] = QFileDialog.getOpenFileName(parent=self.main_window,
caption='Select Table File ...',
directory=_current_folder,
filter="json (*.json);; Log (*.csv)")
QApplication.setOverrideCursor(QtCore.Qt.WaitCursor)

if table_file:
new_path = os.path.dirname(table_file)
self.main_window.current_folder = new_path
Expand All @@ -811,9 +814,11 @@ def _import_table_from_config(self, clear_table=True):
self.main_window.ui.statusbar.setStyleSheet("color: red")
self.main_window.ui.statusbar.showMessage(err.message,
self.main_window.statusbar_display_time)
QApplication.restoreOverrideCursor()
return

o_dict.display_dialog()
QApplication.restoreOverrideCursor()

def _export_table(self):
_current_folder = self.main_window.current_folder
Expand Down

0 comments on commit 4daf64c

Please sign in to comment.