From d74091b691b82c80d71b6b7d62c6f1a6e697d23a Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Thu, 26 Dec 2024 14:11:36 -0500 Subject: [PATCH] For now, skip the progress bar Signed-off-by: Geoff Hutchison --- avogadro/qtplugins/surfaces/orbitals.cpp | 3 +++ avogadro/qtplugins/surfaces/orbitaltablemodel.cpp | 2 +- avogadro/qtplugins/surfaces/orbitalwidget.cpp | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/avogadro/qtplugins/surfaces/orbitals.cpp b/avogadro/qtplugins/surfaces/orbitals.cpp index 058cc3b0ab..84b5ac4ad9 100644 --- a/avogadro/qtplugins/surfaces/orbitals.cpp +++ b/avogadro/qtplugins/surfaces/orbitals.cpp @@ -114,6 +114,7 @@ void Orbitals::loadOrbitals() } m_dialog->fillTable(m_basis); + m_dialog->show(); } void Orbitals::moleculeChanged(unsigned int changes) @@ -425,6 +426,8 @@ void Orbitals::renderOrbital(unsigned int row) if (row == 0) return; + // table rows are indexed from 1 + // orbitals are indexed from 0 unsigned int orbital = row - 1; #ifndef NDEBUG diff --git a/avogadro/qtplugins/surfaces/orbitaltablemodel.cpp b/avogadro/qtplugins/surfaces/orbitaltablemodel.cpp index e0703657ba..a8b44d03d0 100644 --- a/avogadro/qtplugins/surfaces/orbitaltablemodel.cpp +++ b/avogadro/qtplugins/surfaces/orbitaltablemodel.cpp @@ -63,7 +63,7 @@ QVariant OrbitalTableModel::data(const QModelIndex& index, int role) const int stages = (orb->totalStages == 0) ? 1 : orb->totalStages; percent /= float(stages); percent += (orb->stage - 1) * (100.0 / float(stages)); - return percent; + return QString("%L1 %").arg(percent); } case C_Symmetry: symbol = orb->symmetry; diff --git a/avogadro/qtplugins/surfaces/orbitalwidget.cpp b/avogadro/qtplugins/surfaces/orbitalwidget.cpp index b647fbcb42..8d46a132bc 100644 --- a/avogadro/qtplugins/surfaces/orbitalwidget.cpp +++ b/avogadro/qtplugins/surfaces/orbitalwidget.cpp @@ -31,8 +31,8 @@ OrbitalWidget::OrbitalWidget(QWidget* parent, Qt::WindowFlags f) ui.table->horizontalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents); ui.table->horizontalHeader()->setStretchLastSection(true); - ui.table->setItemDelegateForColumn(OrbitalTableModel::C_Status, - new ProgressBarDelegate(this)); + // ui.table->setItemDelegateForColumn(OrbitalTableModel::C_Status, + // new ProgressBarDelegate(this)); ui.table->setItemDelegateForColumn(OrbitalTableModel::C_Symmetry, new RichTextDelegate(this)); // TODO: Support orbital symmetry labels