Skip to content

Commit

Permalink
Fixed renaming issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLazarescu committed Oct 18, 2023
1 parent 3d4a3df commit e57f069
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/presentation/readingPage/MBookmarkItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,22 @@ Rectangle {

Component.onCompleted: {
if (bookmarksView.lastAddedUuid === model.uuid) {
startRenaming()
bookmarksView.lastAddedUuid = ""
renamingStartTimer.start()
}
}

// For some reason qml sometimes forces the active focus to another item right
// after Component.onCompleted, which cancels the renaming. Using a timer with a
// minimal rename to trigger the start of the renaming fixes it.
Timer {
id: renamingStartTimer
interval: 10
repeat: false

onTriggered: startRenaming()
}

RowLayout {
id: layout
anchors.fill: parent
Expand Down

0 comments on commit e57f069

Please sign in to comment.