MoleditPy 2.4.8__py3-none-any.whl → 2.4.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ from PyQt6.QtGui import QFont, QColor
16
16
  from rdkit import Chem
17
17
 
18
18
  #Version
19
- VERSION = '2.4.8'
19
+ VERSION = '2.4.9'
20
20
 
21
21
  ATOM_RADIUS = 18
22
22
  BOND_OFFSET = 3.5
@@ -1838,6 +1838,39 @@ class MainWindowMainInit(object):
1838
1838
  # Add dynamic plugin actions (Legacy + New Registration)
1839
1839
  plugins = self.plugin_manager.discover_plugins(self)
1840
1840
 
1841
+ # --- Update 3D Style Menu with discovered styles ---
1842
+ # This menu is built in init_ui (before plugins are discovered), so we must update it here.
1843
+ if hasattr(self, 'style_button') and self.style_button.menu():
1844
+ style_menu = self.style_button.menu()
1845
+
1846
+ # Find the exclusive ActionGroup from an existing action (e.g. Ball & Stick)
1847
+ style_group = None
1848
+ for action in style_menu.actions():
1849
+ if action.actionGroup():
1850
+ style_group = action.actionGroup()
1851
+ break
1852
+
1853
+ if style_group and self.plugin_manager.custom_3d_styles:
1854
+ # Add separator if not present at end
1855
+ actions = style_menu.actions()
1856
+ if actions and not actions[-1].isSeparator():
1857
+ style_menu.addSeparator()
1858
+
1859
+ for style_name in self.plugin_manager.custom_3d_styles:
1860
+ # Check if already added to avoid duplicates
1861
+ exists = False
1862
+ for act in style_menu.actions():
1863
+ if act.text() == style_name:
1864
+ exists = True
1865
+ break
1866
+
1867
+ if not exists:
1868
+ action = QAction(style_name, self, checkable=True)
1869
+ # Use default arg to capture loop variable
1870
+ action.triggered.connect(lambda checked=False, s=style_name: self.set_3d_style(s))
1871
+ style_menu.addAction(action)
1872
+ style_group.addAction(action)
1873
+
1841
1874
  # 1. Add Registered Menu Actions (New System)
1842
1875
  if self.plugin_manager.menu_actions:
1843
1876
  for action_def in self.plugin_manager.menu_actions:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoleditPy
3
- Version: 2.4.8
3
+ Version: 2.4.9
4
4
  Summary: A cross-platform, simple, and intuitive molecular structure editor built in Python. It allows 2D molecular drawing and 3D structure visualization. It supports exporting structure files for input to DFT calculation software.
5
5
  Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -12,7 +12,7 @@ moleditpy/modules/bond_item.py,sha256=21oX1sR5kpY-MlfUsmekkV6XATVwIAhmsH1UMwV34r
12
12
  moleditpy/modules/bond_length_dialog.py,sha256=6bFPGssnqlgINuqpxLv-OhjMH3_hspnaH8QtorAyu2M,14782
13
13
  moleditpy/modules/calculation_worker.py,sha256=KiGQY7i-QCQofEoE0r65KoQgpEGFcbhmxWv6egfkUdc,42324
14
14
  moleditpy/modules/color_settings_dialog.py,sha256=Ow44BhCOLo0AFb6klO001k6B4drOgKX9DeNBQhZLp5o,15474
15
- moleditpy/modules/constants.py,sha256=M1dGZR8B9RNXfzFq1GhX7lUxMmZn1b_Whtu9ShCQ6wk,4702
15
+ moleditpy/modules/constants.py,sha256=6Q8jR5TnrGM7OnB2cCyDHvTN8XZyg2kH7-Ioz5nsW8s,4702
16
16
  moleditpy/modules/constrained_optimization_dialog.py,sha256=REsk4ePsqNmAGPMTS_jckeM7jexrU3krwun8sKqKUCs,30062
17
17
  moleditpy/modules/custom_interactor_style.py,sha256=LDNODMJoNHGe1AUSrvqv6PdeJm-hpPmSpWINppnJLt0,38942
18
18
  moleditpy/modules/custom_qt_interactor.py,sha256=vCZsDfRO-FtphD5cTP7Ps-5rpHZMIGloaoe6EaKzrsw,4139
@@ -25,7 +25,7 @@ moleditpy/modules/main_window_dialog_manager.py,sha256=QR96LqHAPSOShXbc9cK-Ffq8a
25
25
  moleditpy/modules/main_window_edit_3d.py,sha256=CUArB5wcsgq1C7LygAEC6URlbnn4RhRYDa5n-Y-etWI,19731
26
26
  moleditpy/modules/main_window_edit_actions.py,sha256=drVXRFpSOhILYfApcSro9zssnDw-a8F7wNcfQ3xQukw,69412
27
27
  moleditpy/modules/main_window_export.py,sha256=_Vd7MeP_xaLWDYDm3-ZIZiPuAXhP-AvrQbi7Yx3Jy3c,43020
28
- moleditpy/modules/main_window_main_init.py,sha256=SNgsnovYEbe_5lkpon3Wgh-v5SawI0xsb26DE5-W7ic,94882
28
+ moleditpy/modules/main_window_main_init.py,sha256=s51xvG0vsZnVfLfB6GaidW1axflWWQp8ssPCF63TCUM,96573
29
29
  moleditpy/modules/main_window_molecular_parsers.py,sha256=KR6vzuqc3nutOcorpYr0QOyX3MFBcxTwDhZX96VgJ9Q,48291
30
30
  moleditpy/modules/main_window_project_io.py,sha256=TWwtuKDuvgcvPZ9IGmW8r1EJJOrgxrIJRnxe_f4C1oM,17149
31
31
  moleditpy/modules/main_window_string_importers.py,sha256=v47wOd4RtjKYcF-aLP-mogGGdYTpTEo3dDyAu79_5MM,10782
@@ -51,9 +51,9 @@ moleditpy/modules/assets/file_icon.ico,sha256=yyVj084A7HuMNbV073cE_Ag3Ne405qgOP3
51
51
  moleditpy/modules/assets/icon.icns,sha256=wD5R6-Vw7K662tVKhu2E1ImN0oUuyAP4youesEQsn9c,139863
52
52
  moleditpy/modules/assets/icon.ico,sha256=RfgFcx7-dHY_2STdsOQCQziY5SNhDr3gPnjO6jzEDPI,147975
53
53
  moleditpy/modules/assets/icon.png,sha256=kCFN1WacYIdy0GN6SFEbNA00ef39pCczBnFdkkBI8Bs,147110
54
- moleditpy-2.4.8.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
55
- moleditpy-2.4.8.dist-info/METADATA,sha256=dXEV8a4OwiNRfpQ0vg6EkSN9j1hqLf4j63xJJ3FSsto,60629
56
- moleditpy-2.4.8.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
57
- moleditpy-2.4.8.dist-info/entry_points.txt,sha256=yH1h9JjALhok1foXT3-hYrC4ufoZt8b7oiBcsdnGNNM,54
58
- moleditpy-2.4.8.dist-info/top_level.txt,sha256=ARICrS4ihlPXqywlKl6o-oJa3Qz3gZRWu_VZsQ3_c44,10
59
- moleditpy-2.4.8.dist-info/RECORD,,
54
+ moleditpy-2.4.9.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
55
+ moleditpy-2.4.9.dist-info/METADATA,sha256=XezRDopLrn4ly_NpK452Gxr-8xEkW1wtz0CA-H5ZEkI,60629
56
+ moleditpy-2.4.9.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
57
+ moleditpy-2.4.9.dist-info/entry_points.txt,sha256=yH1h9JjALhok1foXT3-hYrC4ufoZt8b7oiBcsdnGNNM,54
58
+ moleditpy-2.4.9.dist-info/top_level.txt,sha256=ARICrS4ihlPXqywlKl6o-oJa3Qz3gZRWu_VZsQ3_c44,10
59
+ moleditpy-2.4.9.dist-info/RECORD,,