From 7af1584e0103a4661e6538c4f7df4bea6756a00a Mon Sep 17 00:00:00 2001 From: davidpagnon Date: Wed, 18 Sep 2024 00:36:46 +0200 Subject: [PATCH] fixed the fixed multi-tabbed plots --- Pose2Sim/common.py | 6 +++--- setup.cfg | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Pose2Sim/common.py b/Pose2Sim/common.py index 7fd5c4e..a3b8ca0 100644 --- a/Pose2Sim/common.py +++ b/Pose2Sim/common.py @@ -22,9 +22,9 @@ import sys import matplotlib as mpl mpl.use('qt5agg') mpl.rc('figure', max_open_warning=0) -from PyQt5.QtWidgets import QMainWindow, QApplication, QWidget, QTabWidget, QVBoxLayout from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar +from PyQt5.QtWidgets import QMainWindow, QApplication, QWidget, QTabWidget, QVBoxLayout import warnings warnings.filterwarnings("ignore", category=UserWarning, module="c3d") @@ -481,10 +481,10 @@ class plotWindow(): ''' def __init__(self, parent=None): - self.app = QApplication(sys.argv) + self.app = QApplication.instance() if not self.app: self.app = QApplication(sys.argv) - self.MainWindow.__init__() + self.MainWindow = QMainWindow() self.MainWindow.setWindowTitle("Multitabs figure") self.canvases = [] self.figure_handles = [] diff --git a/setup.cfg b/setup.cfg index 32976ff..519e3d3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pose2sim -version = 0.9.11 +version = 0.9.12 author = David Pagnon author_email = contact@david-pagnon.com description = Perform a markerless kinematic analysis from multiple calibrated views as a unified workflow from an OpenPose input to an OpenSim result.