Skip to content

Commit 57d3229

Browse files
committed
Fix "Edit Title" action
1 parent 02ee15a commit 57d3229

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/windows/main_window.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -399,14 +399,14 @@ def actionTitle_trigger(self, event):
399399

400400
def actionEditTitle_trigger(self, event):
401401

402-
# Get requested view item
403-
index = self.filesView.indexAt(event.pos())
404-
405-
# look up svg title file ID from column 5 of that row
406-
selected_id = index.model().sibling(index.row(), 5, index.parent()).data()
402+
# Loop through selected files (set 1 selected file if more than 1)
403+
for f in self.selected_files():
404+
if f.data.get("path").endswith(".svg"):
405+
file_path = f.data.get("path")
406+
break
407407

408-
file = File.get(id=selected_id)
409-
file_path = file.data.get("path")
408+
if not file_path:
409+
return
410410

411411
# show dialog for editing title
412412
from windows.title_editor import TitleEditor

0 commit comments

Comments
 (0)