Skip to content

Commit

Permalink
Fix moving gradient
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelma committed Oct 9, 2023
1 parent 8434f02 commit 4ba4bf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spinetoolbox/spine_db_editor/graphics_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,8 @@ def _move_gradient(self, factor, sign):

def _do_move_gradient(self):
width = self._original_width * self._gradient_width / self._scaling_factor
init_pos = self.rel_item.pos() + (self.obj_item.pos() - self.rel_item.pos()) * self._gradient_position
final_pos = self.obj_item.pos() if self._gradient_sign > 0 else self.rel_item.pos()
init_pos = self.ent_item.pos() + (self.el_item.pos() - self.ent_item.pos()) * self._gradient_position
final_pos = self.el_item.pos() if self._gradient_sign > 0 else self.ent_item.pos()
line = QLineF(init_pos, final_pos)
line.setLength(width)
line.translate(-line.dx() / 2, -line.dy() / 2)
Expand Down

0 comments on commit 4ba4bf5

Please sign in to comment.