Skip to content

Commit

Permalink
Merge branch 'master' into fix_main_program_in_folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ptsavol committed Dec 18, 2024
2 parents 02e3b80 + c266671 commit bb67b22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions spine_items/animations.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"""Animation class for importers and exporters."""
from PySide6.QtCore import QLineF, QObject, QPointF, QRectF, Qt, QTimeLine, Signal, Slot
from PySide6.QtGui import QFont, QFontMetrics, QPainterPath
from PySide6.QtGui import QFont, QFontMetrics, QPainterPath, QColor
from PySide6.QtWidgets import QGraphicsPathItem
from spinetoolbox.helpers import color_from_index

Expand Down Expand Up @@ -47,7 +47,7 @@ def __init__(self, item, duration=1800, plane_count=4, pixel_size=12, loop_width
@Slot(float)
def _handle_time_line_value_changed(self, value):
for plane in self._planes:
plane.advance()
plane.advance(value)

@Slot(QTimeLine.State)
def _handle_time_line_state_changed(self, new_state):
Expand Down Expand Up @@ -135,7 +135,7 @@ def __init__(self, parent, font, trajectory_path, percent, step, loop_rect):
self._step = step
self._loop_rect = loop_rect
self._icon_code = "\uf1d8"
self.setAcceptedMouseButtons(Qt.NoButton)
self.setAcceptedMouseButtons(Qt.MouseButton.NoButton)
self.setZValue(self._parent.svg_item.zValue())
path = QPainterPath()
path.addText(0, (1 - 0.14) * QFontMetrics(font).height(), font, self._icon_code) # 14% baseline for FA
Expand All @@ -144,10 +144,10 @@ def __init__(self, parent, font, trajectory_path, percent, step, loop_rect):
border_pen = self.pen()
border_pen.setWidthF(0.5)
self.setPen(border_pen)
self.color = Qt.white
self.color = QColor(Qt.GlobalColor.white)
self.hide()

def advance(self):
def advance(self, phase):
self._percent = self._percent + self._step
if self._percent > 1:
self._percent = -0.8
Expand Down
2 changes: 1 addition & 1 deletion spine_items/tool/tool_icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _handle_time_line_value_changed(self, value):
delta = QPointF(self._anim_delta_x_factor * value, delta_y)
self.svg_item.setPos(self._svg_item_pos + delta)

@Slot(int)
@Slot(QTimeLine.State)
def _handle_time_line_state_changed(self, new_state):
if new_state == QTimeLine.State.Running:
self.svg_item.setTransformOriginPoint(0, self._anim_transformation_origin_point_y)
Expand Down
1 change: 1 addition & 0 deletions tests/tool/test_Tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def test_save_and_restore_selections(self):
tool.activate()
self._assert_is_simple_exec_tool(tool)

@unittest.skip("Test doesn't work on Python 3.12 on Windows")
def test_find_input_files(self):
"""Test that input files are correctly found in resources
when required input files and available resources are updated"""
Expand Down

0 comments on commit bb67b22

Please sign in to comment.