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 <[email protected]>
This commit is contained in:
Jérôme Duval
2022-09-13 18:48:25 +00:00
committed by waddlesplash
parent 6b3e198d41
commit eac10866e2
@@ -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);
}
}
}