moleditpy 1.2.5__tar.gz → 1.2.6__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moleditpy
3
- Version: 1.2.5
3
+ Version: 1.2.6
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
  Project-URL: Homepage, https://github.com/HiroYokoyama/python_molecular_editor
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "moleditpy"
7
7
 
8
- version = "1.2.5"
8
+ version = "1.2.6"
9
9
 
10
10
  authors = [
11
11
  { name="HiroYokoyama", email="titech.yoko.hiro@gmail.com" },
@@ -11,7 +11,7 @@ DOI 10.5281/zenodo.17268532
11
11
  """
12
12
 
13
13
  #Version
14
- VERSION = '1.2.5'
14
+ VERSION = '1.2.6'
15
15
 
16
16
  print("-----------------------------------------------------")
17
17
  print("MoleditPy — A Python-based molecular editing software")
@@ -41,7 +41,7 @@ from PyQt6.QtGui import (
41
41
  QPen, QBrush, QColor, QPainter, QAction, QActionGroup, QFont, QPolygonF,
42
42
  QPainterPath, QPainterPathStroker, QFontMetrics, QFontMetricsF, QKeySequence, QTransform, QCursor, QPixmap, QIcon, QShortcut, QDesktopServices
43
43
  )
44
- from PyQt6.QtCore import Qt, QPointF, QRectF, QLineF, QObject, QThread, pyqtSignal, QEvent, QMimeData, QByteArray, QUrl
44
+ from PyQt6.QtCore import Qt, QPointF, QRectF, QLineF, QObject, QThread, pyqtSignal, QEvent, QMimeData, QByteArray, QUrl, QTimer
45
45
 
46
46
  from vtkmodules.vtkInteractionStyle import vtkInteractorStyleTrackballCamera
47
47
 
@@ -3322,7 +3322,7 @@ class MainWindow(QMainWindow):
3322
3322
 
3323
3323
  self.statusBar().showMessage(f"Successfully loaded from SMILES.")
3324
3324
  self.reset_undo_stack()
3325
- self.fit_to_view()
3325
+ QTimer.singleShot(0, self.fit_to_view)
3326
3326
  except Exception as e:
3327
3327
  self.statusBar().showMessage(f"Error loading from SMILES: {e}")
3328
3328
 
@@ -3389,8 +3389,8 @@ class MainWindow(QMainWindow):
3389
3389
  self.scene.create_bond(a1_item, a2_item, bond_order=int(b_type), bond_stereo=stereo)
3390
3390
 
3391
3391
  self.statusBar().showMessage(f"Successfully loaded {file_path}")
3392
- self.fit_to_view()
3393
3392
  self.reset_undo_stack()
3393
+ QTimer.singleShot(0, self.fit_to_view)
3394
3394
  except Exception as e: self.statusBar().showMessage(f"Error loading file: {e}")
3395
3395
 
3396
3396
  def save_raw_data(self):
@@ -3416,7 +3416,7 @@ class MainWindow(QMainWindow):
3416
3416
  self.set_state_from_data(loaded_data)
3417
3417
  self.statusBar().showMessage(f"Project loaded from {file_path}")
3418
3418
  self.reset_undo_stack()
3419
- self.fit_to_view()
3419
+ QTimer.singleShot(0, self.fit_to_view)
3420
3420
  except Exception as e: self.statusBar().showMessage(f"Error loading project file: {e}")
3421
3421
 
3422
3422
  def save_as_mol(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moleditpy
3
- Version: 1.2.5
3
+ Version: 1.2.6
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
  Project-URL: Homepage, https://github.com/HiroYokoyama/python_molecular_editor
File without changes
File without changes