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
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
Display correct conflict part in multiple conflicts resolution dialog.
Signed-off-by: alex-z <blackslayer4@gmail.com>
allexzander committed Sep 12, 2023
commit a7fdf14196a1232f0e6baa0a58086f604954221b
20 changes: 10 additions & 10 deletions src/gui/ConflictDelegate.qml
Original file line number Diff line number Diff line change
@@ -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
}
}
}
8 changes: 4 additions & 4 deletions src/gui/ResolveConflictsDialog.qml
Original file line number Diff line number Diff line change
@@ -101,9 +101,9 @@ ApplicationWindow {

font.pixelSize: Style.fontPixelSizeResolveConflictsDialog

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

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

font.pixelSize: Style.fontPixelSizeResolveConflictsDialog

checked: realModel.allConflictingSelected
checked: realModel.allExistingsSelected
onToggled: function() {
realModel.selectAllConflicting(checked)
realModel.selectAllExisting(checked)
}
}
}
4 changes: 2 additions & 2 deletions src/gui/syncconflictsmodel.cpp
Original file line number Diff line number Diff line change
@@ -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;