changeset 24680:2bd8ba9bc39b

fix handling of 1xN and Nx1 structs in variable editor (bug #53054) * variable-editor-model.cc (variable_editor_model::impl::header_data, variable_editor_model::impl::subscript_expression, variable_editor_model::impl::value_at): Use rows and columns of value to detect struct vector, not rows and columns of display.
author John W. Eaton <jwe@octave.org>
date Sat, 03 Feb 2018 10:24:07 -0500
parents a3e67a9e7be5
children ea058ec5ef30
files libgui/src/variable-editor-model.cc
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/variable-editor-model.cc	Sat Feb 03 09:51:34 2018 +0100
+++ b/libgui/src/variable-editor-model.cc	Sat Feb 03 10:24:07 2018 -0500
@@ -359,7 +359,7 @@
                 return QString::fromStdString (fields(section));
               }
           }
-        else if (m_rows == 1 || m_cols == 1)
+        else if (m_value.rows () == 1 || m_value.columns () == 1)
           {
             // Vector struct.  Columns are fields, rows are values.
 
@@ -407,7 +407,7 @@
 
             return QString (".%1").arg (QString::fromStdString (fields(r)));
           }
-        else if (m_rows == 1 || m_cols == 1)
+        else if (m_value.rows () == 1 || m_value.columns () == 1)
           {
             // Vector struct.  Columns are fields, rows are values.
 
@@ -456,7 +456,7 @@
 
             return m.contents (r);
           }
-        else if (m_rows == 1 || m_cols == 1)
+        else if (m_value.rows () == 1 || m_value.columns () == 1)
           {
             // Vector struct.  Columns are fields, rows are values.