Skip to content
Snippets Groups Projects
Commit f10cade5 authored by stefan's avatar stefan
Browse files

GradientEditorWidget, fix for editor problem

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2509 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent cc219542
No related branches found
No related tags found
No related merge requests found
......@@ -107,10 +107,12 @@ class GradientPresetWidget(QtGui.QWidget):
self.immucontextMenu_.popup(QtGui.QCursor.pos())
def Add(self):
if(self.list_view_.currentIndex().isValid()):
self.list_view_.closePersistentEditor(self.list_view_.currentIndex())
row = self.list_model_.GetLastRow()
if self.list_model_.AddItem(datetime.now().isoformat(' '), self.gradient_edit_.GetGradient(), row, True, True):
index = self.list_model_.index(row)
self.self.list_view__.setCurrentIndex(index)
self.list_view_.setCurrentIndex(index)
self.Rename()
else:
QtGui.QMessageBox.information(self, "Gradient not added", "The gradient could not be added!")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment