Changeset 9c9fae1 in sasview for src/sas/sasgui
- Timestamp:
- Apr 6, 2017 10:03:48 AM (8 years ago)
- Branches:
- master, 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- d70f6d2
- Parents:
- 07b50df9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r9c0f3c17 r9c9fae1 12 12 import logging 13 13 import traceback 14 15 from Queue import Queue 16 from threading import Thread 14 17 15 18 from collections import defaultdict … … 239 242 self.set_layout() 240 243 244 # Putting matplotlib in the background so as not to hang the interface 245 self.threadedDrawQueue = Queue() 246 247 self.threadedDrawWorker = Thread(target = self._threaded_draw_worker, args = (self.threadedDrawQueue,)) 248 self.threadedDrawWorker.setDaemon(True) 249 self.threadedDrawWorker.start() 250 251 241 252 def set_index_model(self, index): 242 253 """ … … 1691 1702 :param chisqr: update chisqr value [bool] 1692 1703 """ 1693 wx.CallAfter(self._draw_model_after, update_chisqr, source) 1704 self.threadedDrawQueue.put([update_chisqr, source]) 1705 1706 def _threaded_draw_worker(self, threadedDrawQueue): 1707 while True: 1708 inputVariables = threadedDrawQueue.get() 1709 self._draw_model_after(inputVariables[0], inputVariables[1]) 1710 self.threadedDrawQueue.task_done() 1694 1711 1695 1712 def _draw_model_after(self, update_chisqr=True, source='model'):
Note: See TracChangeset
for help on using the changeset viewer.