diff -r 6686a3326df8 -r a9577f248f04 Debugger/DebugViewer.py --- a/Debugger/DebugViewer.py Mon Jul 08 21:47:26 2013 +0200 +++ b/Debugger/DebugViewer.py Mon Jul 08 22:36:10 2013 +0200 @@ -278,9 +278,9 @@ """ self.globalsViewer.handleResetUI() self.localsViewer.handleResetUI() - self.stackComboBox.clear() self.sourceButton.setEnabled(False) self.currentStack = None + self.stackComboBox.clear() self.__threadList.clear() if self.embeddedShell: self.__tabWidget.setCurrentWidget(self.shellAssembly) @@ -388,6 +388,7 @@ @param stack list of tuples with call stack data (file name, line number, function name, formatted argument/values list) """ + block = self.stackComboBox.blockSignals(True) self.framenr = 0 self.stackComboBox.clear() self.currentStack = stack @@ -396,6 +397,7 @@ # just show base filename to make it readable s = (os.path.basename(s[0]), s[1], s[2]) self.stackComboBox.addItem('{0}:{1}:{2}'.format(*s)) + self.stackComboBox.blockSignals(block) def setVariablesFilter(self, globalsFilter, localsFilter): """ @@ -411,8 +413,10 @@ """ Private slot to handle the source button press to show the selected file. """ - s = self.currentStack[self.stackComboBox.currentIndex()] - self.sourceFile.emit(s[0], int(s[1])) + index = self.stackComboBox.currentIndex() + if index > -1 and self.currentStack: + s = self.currentStack[index] + self.sourceFile.emit(s[0], int(s[1])) def __frameSelected(self, frmnr): """