- Timestamp:
- Nov 29, 2018 9:19:45 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
- Children:
- d9e7792
- Parents:
- 376a939
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
r376a939 r5d75a181 4 4 import time 5 5 import logging 6 import copy 6 7 7 8 from PyQt5 import QtCore … … 240 241 # check if any items loaded and warn about data deletion 241 242 if self.model.rowCount() > 0: 242 msg = "This operation will setremove all data, plots and analyses from"243 msg = "This operation will remove all data, plots and analyses from" 243 244 msg += " SasView before loading the project. Do you wish to continue?" 244 245 msgbox = QtWidgets.QMessageBox(self) … … 539 540 # add the main index 540 541 if not value: continue 541 #if key=='is_batch':542 # self.chkBatch.setChecked(True if value=='True' else False)543 # continue544 542 new_data = value[0] 545 543 from sas.sascalc.dataloader.data_info import Data1D as old_data1d … … 557 555 items.append(new_item) 558 556 model = self.theory_model 559 if new_data.is_data:557 if value[0].is_data: 560 558 model = self.model 561 559 # Caption for the theories … … 797 795 info_item = QtGui.QStandardItem("Info") 798 796 data_item = QtGui.QStandardItem() 799 data_item.setData(item_from.child(0).data()) 797 orig_data = copy.deepcopy(item_from.child(0).data()) 798 data_item.setData(orig_data) 800 799 new_item.setText(item_from.text()) 801 800 new_item.setChild(0, data_item) … … 809 808 new_item.child(0).data().is_data = True 810 809 new_item.child(0).data().symbol = 'Circle' 810 new_item.child(0).data().id = new_name 811 811 except AttributeError: 812 812 #no data here, pass … … 1530 1530 data.is_data = True 1531 1531 data.symbol = 'Circle' 1532 data.id = new_name 1532 1533 except AttributeError: 1533 1534 #no data here, pass … … 1559 1560 deleted_items = [self.model.item(row) for row in range(self.model.rowCount()) 1560 1561 if self.model.item(row).isCheckable()] 1562 deleted_theory_items = [self.theory_model.item(row) 1563 for row in range(self.theory_model.rowCount()) 1564 if self.theory_model.item(row).isCheckable()] 1565 deleted_items += deleted_theory_items 1561 1566 deleted_names = [item.text() for item in deleted_items] 1567 deleted_names += deleted_theory_items 1562 1568 # Let others know we deleted data 1563 1569 self.communicator.dataDeletedSignal.emit(deleted_items) … … 1567 1573 # Clear the model 1568 1574 self.model.clear() 1575 self.theory_model.clear() 1569 1576 1570 1577 def deleteSelectedItem(self):
Note: See TracChangeset
for help on using the changeset viewer.