Mercurial > hg > octave-terminal
changeset 14673:adad007cd018 gui
Fixed bug with querying wrong matrix dimensions (bug #36421).
* OctaveLink.cpp (octaveValuesAsQString): Now querying for octaveValue.rows() and columns() instead using the matrix_values() dimensions.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Tue, 22 May 2012 23:34:40 +0200 |
parents | 7b607001d571 |
children | 252a86f8fe62 |
files | gui/src/MainWindow.cpp gui/src/WorkspaceModel.cpp gui/src/backend/OctaveLink.cpp |
diffstat | 3 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/src/MainWindow.cpp +++ b/gui/src/MainWindow.cpp @@ -340,7 +340,6 @@ connect (copyAction, SIGNAL (triggered()), m_terminalView, SLOT(copyClipboard ())); connect (pasteAction, SIGNAL (triggered()), m_terminalView, SLOT(pasteClipboard ())); - setWindowTitle ("Octave"); addDockWidget (Qt::LeftDockWidgetArea, m_workspaceView);
--- a/gui/src/WorkspaceModel.cpp +++ b/gui/src/WorkspaceModel.cpp @@ -263,17 +263,17 @@ } else if (octaveValue.is_real_matrix ()) { - return QString ("%1x%2 matrix") - .arg (octaveValue.matrix_value ().rows ()) - .arg (octaveValue.matrix_value ().cols ()); + return QString ("%1x%2") + .arg (octaveValue.rows ()) + .arg (octaveValue.columns ()); // Convert complex matrix. } else if (octaveValue.is_complex_matrix ()) { - return QString ("%1x%2 complex matrix") - .arg (octaveValue.matrix_value ().rows ()) - .arg (octaveValue.matrix_value ().cols ()); + return QString ("%1x%2") + .arg (octaveValue.rows ()) + .arg (octaveValue.columns ()); // If everything else does not fit, we could not recognize the type. }
--- a/gui/src/backend/OctaveLink.cpp +++ b/gui/src/backend/OctaveLink.cpp @@ -16,11 +16,14 @@ */ #include "OctaveLink.h" +#include "load-path.h" +#include <QDir> int update_hook_impl() { OctaveLink::instance()->triggerUpdateHistoryModel(); OctaveLink::instance()->triggerCacheSymbolTable(); + QDir::setCurrent(load_path::get_command_line_path().c_str()); return 0; }