octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61713] uitable crashes with data containing [


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #61713] uitable crashes with data containing []
Date: Wed, 22 Dec 2021 08:12:06 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Update of bug #61713 (project octave):

                Category:         Octave Function => Plotting with OpenGL   
                Severity:              3 - Normal => 4 - Important          
                  Status:                    None => In Progress            
        Operating System:       Microsoft Windows => Any                    

    _______________________________________________________

Follow-up Comment #2:

The following simple change avoids the crash and displays an empty cell (2,2),
as does ML online (sorry I can't write a proper mercurial cset ATM):


diff -r b65d423b12a6 libgui/graphics/Table.cc
--- a/libgui/graphics/Table.cc  Sun Dec 19 20:42:45 2021 +0100
+++ b/libgui/graphics/Table.cc  Wed Dec 22 14:06:17 2021 +0100
@@ -196,7 +196,12 @@
   {
     Qt::AlignmentFlag flag = Qt::AlignRight;
     QString text;
-    if (val.is_string ())
+    if (val.isempty ())
+      {
+        text = "";
+        flag = Qt::AlignLeft ;
+      }
+    else if (val.is_string ())
       {
         text = octave::Utils::fromStdString (val.string_value ());
         flag = Qt::AlignLeft ;



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61713>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]