comparison libgui/graphics/Table.cc @ 31791:5cb96bc0adc8

maint: Merge stable to default.
author John W. Eaton <jwe@octave.org>
date Sun, 29 Jan 2023 13:10:40 -0500
parents 21f9b34eb893 abe72b9464d6
children 90621682cc03
comparison
equal deleted inserted replaced
31789:5e9bfd2c11b5 31791:5cb96bc0adc8
313 else 313 else
314 text = Utils::fromStdString (b ? "1" : "0"); 314 text = Utils::fromStdString (b ? "1" : "0");
315 } 315 }
316 else 316 else
317 { 317 {
318 std::stringstream warn_string; 318 // FIXME: Should we warn about the unknown conversion? If so,
319 warn_string << "Unknown conversion for datatype " << val.class_name () 319 // how? We can't just call Octave's warning function here.
320 << " to " << format
321 << " for value " << val.string_value (true);
322 warning ("%s", warn_string.str ().c_str ());
323 320
324 text = Utils::fromStdString (val.string_value (true)); 321 text = Utils::fromStdString (val.string_value (true));
325 } 322 }
326 323
327 return std::make_pair (flag, text); 324 return std::make_pair (flag, text);
537 octave_value old_value, 534 octave_value old_value,
538 octave_value new_value, 535 octave_value new_value,
539 octave_value edit_data, 536 octave_value edit_data,
540 octave_value error) 537 octave_value error)
541 { 538 {
542
543 if (!(properties<uitable> ().get_celleditcallback ().isempty ())) 539 if (!(properties<uitable> ().get_celleditcallback ().isempty ()))
544 { 540 {
545 Matrix indices = Matrix (1, 2); 541 Matrix indices = Matrix (1, 2);
546 indices(0, 0) = row + 1; 542 indices(0, 0) = row + 1;
547 indices(0, 1) = col + 1; 543 indices(0, 1) = col + 1;
556 octave_value cellEditCallbackEventObject (eventData); 552 octave_value cellEditCallbackEventObject (eventData);
557 553
558 emit gh_callback_event (m_handle, "celleditcallback", 554 emit gh_callback_event (m_handle, "celleditcallback",
559 cellEditCallbackEventObject); 555 cellEditCallbackEventObject);
560 } 556 }
561 else if (error.string_value ().length () > 0)
562 warning ("%s", error.string_value ().c_str ());
563 } 557 }
564 558
565 void 559 void
566 Table::comboBoxCurrentIndexChanged (const QString& value) 560 Table::comboBoxCurrentIndexChanged (const QString& value)
567 { 561 {