changeset 24676:b5dbcfa1e3e7

variable editor: don't set data for elements that require sub editor * variable-editor-model.cc (variable_editor_model::setData): Also return early if element requires a sub editor.
author John W. Eaton <jwe@octave.org>
date Fri, 02 Feb 2018 14:59:32 -0500
parents 1c1789fa5d89
children 69b89e81d3d3
files libgui/src/variable-editor-model.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/variable-editor-model.cc	Fri Feb 02 14:47:18 2018 -0500
+++ b/libgui/src/variable-editor-model.cc	Fri Feb 02 14:59:32 2018 -0500
@@ -665,7 +665,7 @@
                                 int role)
 {
   if (role != Qt::EditRole || v.type () != QVariant::String
-      || ! idx.isValid ())
+      || ! idx.isValid () || requires_sub_editor (idx))
     return false;
 
   // Initially, set value to whatever the user entered.