Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.current_model = self.current_dataView.model()
df = self.current_model.df
# clear matches and selection from last search results
if self.findThread:
self.findThread.stop()
self.search_matches = []
self.current_dataView.selectionModel().clear()
self.matches_found_label.setText("Matches Found: 0")
self.search_selection = None
if not text:
return
# Initialize findThread
self.findThread = FindThread(df, text, self.match_flags)
self.findThread.matches.connect(self.update_matches)
self.findThread.start()