|
|
@@ -14,7 +14,7 @@ ConflictItemWidget::ConflictItemWidget(QListWidget* parent, const QFile& file, c
|
|
|
ui.fileIcon->setPixmap(IconProvider::FromFile(file, ui.fileIcon->baseSize()));
|
|
|
ui.filename->setText(p.filename().string().c_str());
|
|
|
|
|
|
- connect(ui.buttonUseVersion, &QPushButton::clicked, this, [this]() { SetAction(Action::UseVersion); });
|
|
|
+ connect(ui.ddUseVersion, &CheckableComboBox::activated, this, [this]() { SetAction(Action::UseVersion); });
|
|
|
connect(ui.buttonCopy, &QPushButton::clicked, this, [this]() { SetAction(Action::Copy); });
|
|
|
connect(ui.buttonRemove, &QPushButton::clicked, this, [this]() { SetAction(Action::Remove); });
|
|
|
connect(ui.buttonIgnore, &QPushButton::clicked, this, [this]() { SetAction(Action::Ignore); });
|
|
|
@@ -22,12 +22,12 @@ ConflictItemWidget::ConflictItemWidget(QListWidget* parent, const QFile& file, c
|
|
|
|
|
|
void ConflictItemWidget::SetAction(Action&& action)
|
|
|
{
|
|
|
+ ui.ddUseVersion->setChecked(action == Action::UseVersion);
|
|
|
+ ui.buttonCopy->setChecked(action == Action::Copy);
|
|
|
+ ui.buttonRemove->setChecked(action == Action::Remove);
|
|
|
+ ui.buttonIgnore->setChecked(action == Action::Ignore);
|
|
|
if (currentAction != action)
|
|
|
{
|
|
|
- ui.buttonUseVersion->setChecked(action == Action::UseVersion);
|
|
|
- ui.buttonCopy->setChecked(action == Action::Copy);
|
|
|
- ui.buttonRemove->setChecked(action == Action::Remove);
|
|
|
- ui.buttonIgnore->setChecked(action == Action::Ignore);
|
|
|
currentAction = action;
|
|
|
emit ActionChanged();
|
|
|
}
|
|
|
@@ -110,7 +110,6 @@ ConflictItemWidget* ConflictItemWidget::FromMissingFile(QListWidget* parent, con
|
|
|
{
|
|
|
const std::string fullPathFirstFound = rootPaths[std::distance(version.begin(), std::find(version.begin(), version.end(), true))] + "/" + filename;
|
|
|
ConflictItemWidget* result = new ConflictItemWidget(parent, QFile(fullPathFirstFound.c_str()), filename);
|
|
|
- result->ui.buttonUseVersion->setVisible(false);
|
|
|
result->ui.ddUseVersion->setVisible(false);
|
|
|
std::stringstream ss;
|
|
|
ss << "File " << HTMLFont(filename, FILE_STYLE) << " does not exists in every repositories: <ul>";
|
|
|
@@ -124,7 +123,6 @@ ConflictItemWidget* ConflictItemWidget::FromMissingDir(QListWidget* parent, cons
|
|
|
{
|
|
|
const std::string fullPathFirstFound = rootPaths[std::distance(version.begin(), std::find(version.begin(), version.end(), true))] + "/" + filename;
|
|
|
ConflictItemWidget* result = new ConflictItemWidget(parent, QFile(fullPathFirstFound.c_str()), filename);
|
|
|
- result->ui.buttonUseVersion->setVisible(false);
|
|
|
result->ui.ddUseVersion->setVisible(false);
|
|
|
std::stringstream ss;
|
|
|
ss << "Folder " << HTMLFont(filename, FILE_STYLE) << " does not exists in every repositories: <ul>";
|