Changeset c5c247e in sasview for src/sas/sasgui
- Timestamp:
- Apr 6, 2017 9:14:03 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:
- 922ef55
- Parents:
- d70f6d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
rd70f6d2 rc5c247e 13 13 import traceback 14 14 15 from time import time 15 16 from Queue import Queue 16 17 from threading import Thread 17 18 18 from collections import defaultdict 19 19 from wx.lib.scrolledpanel import ScrolledPanel … … 242 242 self.set_layout() 243 243 244 # Putting matplotlib in the background so as not to hang the interface244 # Setting up a thread for the fitting 245 245 self.threadedDrawQueue = Queue() 246 246 … … 249 249 self.threadedDrawWorker.start() 250 250 251 # And a home for the thread submission times 252 self.lastTimeFitSubmitted = None 251 253 252 254 def set_index_model(self, index): … … 1702 1704 :param chisqr: update chisqr value [bool] 1703 1705 """ 1704 self.threadedDrawQueue.put([update_chisqr, source]) 1706 1707 currentTime = time() 1708 # # So, if a whole pile of jobs are submitted in quick succession, 1709 # # let's say in less than 0.1 sec, we'll filter them out, assuming something is running! 1710 if ((self._manager.calc_1D is not None) and self._manager.calc_1D.isrunning()) or ((self._manager.calc_2D is not None) and self._manager.calc_2D.isrunning()): 1711 if currentTime > (self.lastTimeFitSubmitted + 0.1): 1712 self.threadedDrawQueue.put([update_chisqr, source]) 1713 else: 1714 self.threadedDrawQueue.put([update_chisqr, source]) 1715 1716 self.lastTimeFitSubmitted = currentTime 1705 1717 1706 1718 def _threaded_draw_worker(self, threadedDrawQueue): … … 1732 1744 toggle_mode_on = self.model_view.IsEnabled() 1733 1745 is_2d = self._is_2D() 1746 1734 1747 self._manager.draw_model(self.model, 1735 1748 data=self.data,
Note: See TracChangeset
for help on using the changeset viewer.