DriveSetup: select the actual partition type instead of defaulting to BeFS

Change-Id: Id73ad3398e802eb10b1928317bb9987ddee30eb6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5658
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
Jérôme Duval 2022-09-11 19:02:00 +02:00 committed by waddlesplash
parent 6b3e198d41
commit eac10866e2

View File

@ -125,6 +125,10 @@ ChangeParametersPanel::CreateChangeControls(BPartition* partition,
fTypePopUpMenu = new BPopUpMenu("Partition Type");
const char* type = NULL;
if (partition != NULL)
type = partition->Type();
int32 cookie = 0;
BString supportedType;
if (parent != NULL) {
@ -135,8 +139,11 @@ ChangeParametersPanel::CreateChangeControls(BPartition* partition,
BMenuItem* item = new BMenuItem(supportedType, message);
fTypePopUpMenu->AddItem(item);
if (strcmp(supportedType, kPartitionTypeBFS) == 0)
if (type != NULL) {
item->SetMarked(strcmp(supportedType, type) == 0);
} else if (strcmp(supportedType, kPartitionTypeBFS) == 0) {
item->SetMarked(true);
}
}
}