Skip to content

Commit

Permalink
Disabling region selection after closing window Initialize Effect
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennoCaldato committed Nov 30, 2020
1 parent 2a934ee commit 2b2a81d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/windows/region.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def accept(self):
""" Ok button clicked """

self.shutdownPlayer()
get_app().window.SelectRegionSignal.emit("")
super(SelectRegion, self).accept()

def shutdownPlayer(self):
Expand All @@ -270,6 +271,7 @@ def reject(self):

# Cancel dialog
self.shutdownPlayer()
get_app().window.SelectRegionSignal.emit("")
super(SelectRegion, self).reject()


Expand Down
7 changes: 6 additions & 1 deletion src/windows/video_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,12 @@ def transformTriggered(self, clip_id):

def regionTriggered(self, clip_id):
"""Handle the 'select region' signal when it's emitted"""
self.region_enabled = True
if self and not clip_id:
# Clear transform
self.region_enabled = False
else:
self.region_enabled = True

get_app().window.refreshFrameSignal.emit()

def resizeEvent(self, event):
Expand Down

0 comments on commit 2b2a81d

Please sign in to comment.