[update] apw saved, proper deletion of figures
This commit is contained in:
		
							parent
							
								
									6acb0ad580
								
							
						
					
					
						commit
						0949a6deac
					
				| @ -127,6 +127,7 @@ class MainWindow(QMainWindow): | ||||
|         self.project = Project() | ||||
|         self.project.parameter = self._inputs | ||||
|         self.tap = None | ||||
|         self.apw = None | ||||
|         self.paraBox = None | ||||
|         self.array_map = None | ||||
|         self._metadata = None | ||||
| @ -1117,7 +1118,7 @@ class MainWindow(QMainWindow): | ||||
|         ''' | ||||
| 
 | ||||
|         # if pick widget is open, refresh tooltips as well | ||||
|         if hasattr(self, 'apw'): | ||||
|         if self.apw: | ||||
|             self.apw.refresh_tooltips() | ||||
|         if hasattr(self, 'cmpw'): | ||||
|             self.cmpw.refresh_tooltips() | ||||
| @ -2093,6 +2094,7 @@ class MainWindow(QMainWindow): | ||||
|                                 "No autoPyLoT output declared!") | ||||
|             return | ||||
| 
 | ||||
|         if not self.apw: | ||||
|             # init event selection options for autopick | ||||
|             self.pickoptions =[('current event', self.get_current_event, None), | ||||
|                                ('tune events', self.get_ref_events, self._style['ref']['rgba']), | ||||
|  | ||||
| @ -131,7 +131,6 @@ class Worker(QRunnable): | ||||
|         try: | ||||
|             result = self.fun(self.args) | ||||
|         except: | ||||
|             #traceback.print_exc() | ||||
|             exctype, value = sys.exc_info ()[:2] | ||||
|             print(exctype, value, traceback.format_exc()) | ||||
|             self.signals.error.emit ((exctype, value, traceback.format_exc ())) | ||||
|  | ||||
| @ -2298,6 +2298,7 @@ class AutoPickWidget(MultiEventWidget): | ||||
| 
 | ||||
|     def __init__(self, parent, options): | ||||
|         MultiEventWidget.__init__(self, options, parent, 1) | ||||
|         self.events2plot = {} | ||||
|         self.connect_buttons() | ||||
|         self.init_plot_layout() | ||||
|         self.init_log_layout() | ||||
| @ -2365,6 +2366,9 @@ class AutoPickWidget(MultiEventWidget): | ||||
|         self.main_layout.setStretch(1, 1) | ||||
| 
 | ||||
|     def reinitEvents2plot(self): | ||||
|         for eventID, eventDict in self.events2plot.items(): | ||||
|             for widget_key, widget in eventDict.items(): | ||||
|                 widget.setParent(None) | ||||
|         self.events2plot = {} | ||||
|         self.eventbox.clear() | ||||
|         self.refresh_plot_tabs() | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user