Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display correct conflict part in multiple conflicts resolution dialog. #6043

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/gui/ConflictDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,29 @@ Item {
Layout.fillWidth: true
Layout.fillHeight: true

itemSelected: root.existingSelected
itemPreviewUrl: root.existingPreviewUrl
itemSelected: root.conflictSelected
itemPreviewUrl: root.conflictPreviewUrl
itemVersionLabel: qsTr('Local version')
itemDateLabel: root.existingDate
itemFileSizeLabel: root.existingSize
itemDateLabel: root.conflictDate
itemFileSizeLabel: root.conflictSize

onSelectedChanged: function() {
model.existingSelected = itemSelected
model.conflictSelected = itemSelected
}
}

ConflictItemFileInfo {
Layout.fillWidth: true
Layout.fillHeight: true

itemSelected: root.conflictSelected
itemPreviewUrl: root.conflictPreviewUrl
itemSelected: root.existingSelected
itemPreviewUrl: root.existingPreviewUrl
itemVersionLabel: qsTr('Server version')
itemDateLabel: root.conflictDate
itemFileSizeLabel: root.conflictSize
itemDateLabel: root.existingDate
itemFileSizeLabel: root.existingSize

onSelectedChanged: function() {
model.conflictSelected = itemSelected
model.existingSelected = itemSelected
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/gui/ResolveConflictsDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ ApplicationWindow {

font.pixelSize: Style.fontPixelSizeResolveConflictsDialog

checked: realModel.allExistingsSelected
checked: realModel.allConflictingSelected
onToggled: function() {
realModel.selectAllExisting(checked)
realModel.selectAllConflicting(checked)
}
}

Expand All @@ -119,9 +119,9 @@ ApplicationWindow {

font.pixelSize: Style.fontPixelSizeResolveConflictsDialog

checked: realModel.allConflictingSelected
checked: realModel.allExistingsSelected
onToggled: function() {
realModel.selectAllConflicting(checked)
realModel.selectAllExisting(checked)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/gui/syncconflictsmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ ConflictSolver::Solution SyncConflictsModel::ConflictInfo::solution() const
if (mConflictSelected == ConflictSolution::SolutionSelected && mExistingSelected == ConflictSolution::SolutionSelected) {
result = ConflictSolver::KeepBothVersions;
} else if (mConflictSelected == ConflictSolution::SolutionDeselected && mExistingSelected == ConflictSolution::SolutionSelected) {
result = ConflictSolver::KeepLocalVersion;
} else if (mConflictSelected == ConflictSolution::SolutionSelected && mExistingSelected == ConflictSolution::SolutionDeselected) {
result = ConflictSolver::KeepRemoteVersion;
} else if (mConflictSelected == ConflictSolution::SolutionSelected && mExistingSelected == ConflictSolution::SolutionDeselected) {
result = ConflictSolver::KeepLocalVersion;
}

return result;
Expand Down
Loading