mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-19 09:45:43 -04:00
Replace action for paddings
- and a very small visual bugfix
This commit is contained in:
parent
e5cf61f89a
commit
9c7c94702d
4 changed files with 77 additions and 6 deletions
|
@ -153,7 +153,7 @@ void UEFITool::populateUi(const QModelIndex ¤t)
|
|||
(type == Types::Section && (subtype == EFI_SECTION_COMPRESSION || subtype == EFI_SECTION_GUID_DEFINED || subtype == EFI_SECTION_DISPOSABLE)));
|
||||
ui->actionInsertBefore->setEnabled(type == Types::File || type == Types::Section);
|
||||
ui->actionInsertAfter->setEnabled(type == Types::File || type == Types::Section);
|
||||
ui->actionReplace->setEnabled((type == Types::Region && subtype != Subtypes::DescriptorRegion) || type == Types::Volume || type == Types::File || type == Types::Section);
|
||||
ui->actionReplace->setEnabled((type == Types::Region && subtype != Subtypes::DescriptorRegion) || type == Types::Padding || type == Types::Volume || type == Types::File || type == Types::Section);
|
||||
ui->actionReplaceBody->setEnabled(type == Types::Volume || type == Types::File || type == Types::Section);
|
||||
ui->actionMessagesCopy->setEnabled(false);
|
||||
}
|
||||
|
@ -327,6 +327,13 @@ void UEFITool::replace(const UINT8 mode)
|
|||
else
|
||||
return;
|
||||
}
|
||||
else if (model->type(index) == Types::Padding) {
|
||||
if (mode == REPLACE_MODE_AS_IS) {
|
||||
path = QFileDialog::getOpenFileName(this, tr("Select padding file to replace selected object"), currentDir, "Padding files (*.pad *.bin);;All files (*)");
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
else if (model->type(index) == Types::Volume) {
|
||||
if (mode == REPLACE_MODE_AS_IS) {
|
||||
path = QFileDialog::getOpenFileName(this, tr("Select volume file to replace selected object"), currentDir, "Volume files (*.vol *.bin);;All files (*)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue