Skip to content

Commit

Permalink
* Fixed animations for PySide6
Browse files Browse the repository at this point in the history
- Removed logic for checking for old versions of PySide
  • Loading branch information
ImLucasBrown committed Oct 17, 2024
1 parent beb1bce commit 4bb3406
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
12 changes: 1 addition & 11 deletions nxt_editor/node_graphics_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
from Qt import QtWidgets
from Qt import QtGui
from Qt import QtCore
from PySide6 import __version_info__ as qt_version

# Internal
import nxt_editor
from nxt import nxt_path, nxt_node
Expand All @@ -25,16 +23,8 @@

MIN_LOD = user_prefs.get(USER_PREF.LOD, .4)

_pyside_version = qt_version


if _pyside_version[1] < 11:
graphic_type = QtWidgets.QGraphicsItem
else:
graphic_type = QtWidgets.QGraphicsObject


class NodeGraphicsItem(graphic_type):
class NodeGraphicsItem(QtWidgets.QGraphicsObject):
"""The graphics item used to represent nodes in the graph. Contains
instances of NodeGraphicsPlug for each attribute on the associated node.
Contains functionality for arranging children into stacks.
Expand Down
5 changes: 1 addition & 4 deletions nxt_editor/stage_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
# Interal
import nxt_editor
from nxt import nxt_node, tokens
from nxt_editor.node_graphics_item import (NodeGraphicsItem, NodeGraphicsPlug,
_pyside_version)
from nxt_editor.node_graphics_item import NodeGraphicsItem, NodeGraphicsPlug
from nxt_editor.connection_graphics_item import AttrConnectionGraphic
from nxt_editor.dialogs import NxtWarningDialog
from nxt_editor.commands import *
Expand Down Expand Up @@ -43,8 +42,6 @@ def __init__(self, model, parent=None):
super(StageView, self).__init__(parent=parent)
self.main_window = parent
self._do_anim_pref = user_prefs.get(USER_PREF.ANIMATION, True)
if _pyside_version[1] < 11:
self._do_anim_pref = False
self.do_animations = self._do_anim_pref
self.once_sec_timer = QtCore.QTimer(self)
self.once_sec_timer.timeout.connect(self.calculate_fps)
Expand Down

0 comments on commit 4bb3406

Please sign in to comment.