Changeset 200bd7e in sasview for src/sas/qtgui/Utilities/GuiUtils.py
- Timestamp:
- Dec 1, 2017 12:51:32 AM (7 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:
- 50bfab0
- Parents:
- 19fce84 (diff), 6cb305a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GuiUtils.py
rcb4d219 r6cb305a 58 58 # clean all these module variables and put them into a config class 59 59 # that can be passed by sasview.py. 60 # logging.info(sys.executable)61 # logging.info(str(sys.argv))60 # logging.info(sys.executable) 61 # logging.info(str(sys.argv)) 62 62 from sas import sasview as sasview 63 63 app_path = os.path.dirname(sasview.__file__) 64 # logging.info("Using application path: %s", app_path)64 # logging.info("Using application path: %s", app_path) 65 65 return app_path 66 66 … … 249 249 if plot_item.isCheckable(): 250 250 plot_data = plot_item.child(0).data() 251 if plot_data.id is not None and plot_data.id == update_data.id: 251 if plot_data.id is not None and \ 252 (plot_data.name == update_data.name or plot_data.id == update_data.id): 253 # if plot_data.id is not None and plot_data.id == update_data.id: 252 254 # replace data section in item 253 255 plot_item.child(0).setData(update_data) … … 343 345 for index in range(model_item.rowCount()): 344 346 item = model_item.item(index) 345 if item.text() == filename and item.isCheckable() and item.checkState() == QtCore.Qt.Checked: 347 if item.text() == filename and item.isCheckable() \ 348 and item.checkState() == QtCore.Qt.Checked: 346 349 # Going 1 level deeper only 347 350 for index_2 in range(item.rowCount()): … … 360 363 361 364 # Iterate over model looking for named items 362 item = list([i for i in [model_item.item(index) for index in range(model_item.rowCount())] if str(i.text()) == filename]) 365 item = list([i for i in [model_item.item(index) 366 for index in range(model_item.rowCount())] 367 if str(i.text()) == filename]) 363 368 return item[0] if len(item)>0 else None 364 369 … … 396 401 for index in range(model_item.rowCount()): 397 402 item = model_item.item(index) 398 if item.isCheckable() and item.checkState() == QtCore.Qt.Checked: 399 # TODO: assure item type is correct (either data1/2D or Plotter) 400 plot_data.append((item, item.child(0).data())) 403 401 404 # Going 1 level deeper only 402 405 for index_2 in range(item.rowCount()): … … 405 408 # TODO: assure item type is correct (either data1/2D or Plotter) 406 409 plot_data.append((item_2, item_2.child(0).data())) 410 411 if item.isCheckable() and item.checkState() == QtCore.Qt.Checked: 412 # TODO: assure item type is correct (either data1/2D or Plotter) 413 plot_data.append((item, item.child(0).data())) 407 414 408 415 return plot_data
Note: See TracChangeset
for help on using the changeset viewer.