Changeset 0cd8612 in sasview for src/sas/qtgui/DataExplorer.py
- Timestamp:
- Jul 8, 2016 10:13:41 AM (8 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- a95260d
- Parents:
- e540cd2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/DataExplorer.py
re540cd2 r0cd8612 13 13 14 14 # SAS 15 from GuiUtils import * 15 import GuiUtils 16 16 from Plotter import Plotter 17 17 from sas.sascalc.dataloader.loader import Loader … … 307 307 """ 308 308 309 plots = plotsFromCheckedItems(self.model)309 plots = GuiUtils.plotsFromCheckedItems(self.model) 310 310 311 311 # Call show on requested plots … … 334 334 paths = [str(f) for f in paths] 335 335 336 if type(paths) is not list:336 if not isinstance(paths, list): 337 337 paths = [paths] 338 338 … … 358 358 basename = os.path.basename(p_file) 359 359 _, extension = os.path.splitext(basename) 360 if extension.lower() in EXTENSIONS:360 if extension.lower() in GuiUtils.EXTENSIONS: 361 361 any_error = True 362 362 log_msg = "Data Loader cannot " … … 430 430 431 431 if any_error or error_message: 432 self.communicator.statusBarUpdateSignal.emit(error_message) 432 logging.error(error_message) 433 status_bar_message = "Errors occurred while loading %s" % format(basename) 434 self.communicator.statusBarUpdateSignal.emit(status_bar_message) 433 435 434 436 else: 435 437 message = "Loading Data Complete! " 436 438 message += log_msg 439 # Notify the progress bar that the updates are over. 437 440 self.communicator.progressBarUpdateSignal.emit(-1) 438 441 … … 485 488 486 489 try: 487 is1D = type(item.child(0).data().toPyObject()) is Data1D490 is1D = isinstance(item.child(0).data().toPyObject(), Data1D) 488 491 except AttributeError: 489 492 msg = "Bad structure of the data model." … … 499 502 500 503 try: 501 is1D = type(item.child(0).data().toPyObject()) is Data1D504 is1D = isinstance(item.child(0).data().toPyObject(), Data1D) 502 505 except AttributeError: 503 506 msg = "Bad structure of the data model." … … 513 516 item.setCheckState(QtCore.Qt.Unchecked) 514 517 try: 515 is2D = type(item.child(0).data().toPyObject()) is Data2D518 is2D = isinstance(item.child(0).data().toPyObject(), Data2D) 516 519 except AttributeError: 517 520 msg = "Bad structure of the data model." … … 527 530 528 531 try: 529 is2D = type(item.child(0).data().toPyObject()) is Data2D532 is2D = isinstance(item.child(0).data().toPyObject(), Data2D) 530 533 except AttributeError: 531 534 msg = "Bad structure of the data model." … … 602 605 603 606 # Add rows for display in the view 604 info_item = infoFromData(data)607 info_item = GuiUtils.infoFromData(data) 605 608 606 609 # Set info_item as the only child … … 616 619 """ 617 620 # Assert the correct type 618 if type(model_item) != QtGui.QStandardItem:621 if not isinstance(model_item, QtGui.QStandardItem): 619 622 msg = "Wrong data type returned from calculations." 620 623 raise AttributeError, msg
Note: See TracChangeset
for help on using the changeset viewer.