https://bugs.kde.org/show_bug.cgi?id=463018

Mariano Boragno <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from Mariano Boragno <[email protected]> ---
Created attachment 198409
  --> https://bugs.kde.org/attachment.cgi?id=198409&action=edit
Working patch for review (AI generated)

Per Gemini 3.8 Flash, please review, I'm not a developer but just a simple user
of the app:

In modern avogadrolibs (v2.x), the scene rendering plugins (ScenePlugin, e.g.
Ball and Stick, Licorice, etc.) depend on PluginLayerManager, which checks
whether the active layer is enabled on the current molecule. For this check to
succeed, Avogadro requires the active molecule to be registered via

Avogadro::Core::LayerManager::setActiveMolecule(mol).

Because Kalzium never called setActiveMolecule(), activeMoleculeInfo() returned
nullptr. As a result, ScenePlugin::setEnabled(true) silently failed (all scene
plugins remained disabled, isEnabled() == false), causing the OpenGL viewport
to render an empty/black canvas even after a molecule was loaded.

Proposed fix:
Override KalziumGLWidget::setMolecule() to invoke
Avogadro::Core::LayerManager::setActiveMolecule(), and call
slotUpdateScenePlugin() when a new molecule is loaded in
MoleculeDialog::loadMolecule().

Attached is the patch against the current git master.

Environment & Build Details

OS: Arch Linux (Kernel 7.2.11-arch1-1, x86_64)
Kalzium source: Git master (commit ab382e00 / v26.08.3)
Compiler: GCC 16.2.1 / CMake with extra-cmake-modules 6.31.0

Libraries:
  - avogadrolibs / avogadrolibs-qt: 2.1.0-1
  - openbabel: 3.2.1-1
  - eigen: 5.0.1-2
  - Qt6 (qt6-base): 6.12.0
  - KDE Frameworks 6 (KF6): 6.31.0

Session: Wayland (tested with QT_QPA_PLATFORM=xcb)

The patch was investigated and drafted with AI assistance, and tested locally
by building Kalzium from git master against avogadrolibs 2.1.0, successfully
confirming that molecules now render and interact as expected.

Thank you!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to