Skip to content

Commit

Permalink
Fixing Sentry.io OPENSHOT-H3: wrapped C/C++ object of type QStandardI…
Browse files Browse the repository at this point in the history
…tem has been deleted
  • Loading branch information
jonoomph committed Jun 23, 2024
1 parent 30d196d commit 205d1fd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/windows/views/properties_tableview.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,22 @@ def caption_text_updated(self, new_caption_text, caption_model_row):
# Ignore blank selections
return

caption_model_label = caption_model_row[0]
caption_model_value = caption_model_row[1]

# Verify label has not been deleted
if (caption_model_label and sip.isdeleted(caption_model_label)) or \
(caption_model_value and sip.isdeleted(caption_model_value)):
log.debug("Property has been deleted, skipping")
return

# Get data model and selection
cur_property = caption_model_row[0].data()
cur_property = caption_model_label.data()
property_type = cur_property[1]["type"]

# Save caption text
if property_type == "caption" and cur_property[1].get('memo') != new_caption_text:
self.clip_properties_model.value_updated(caption_model_row[1], value=new_caption_text)
self.clip_properties_model.value_updated(caption_model_value, value=new_caption_text)

def select_item(self, item_id, item_type):
""" Update the selected item in the properties window """
Expand Down

0 comments on commit 205d1fd

Please sign in to comment.