Accidentially removed one preparation/cancellation too many. Added it back
but cancel only if preparing was successful. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26463 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a9cc6c1e3d
commit
2570af9d13
@ -505,6 +505,7 @@ fSurfaceTestMI->SetEnabled(false);
|
||||
parentPartition = disk->FindDescendant(parentID);
|
||||
|
||||
if (parentPartition) {
|
||||
bool prepared = disk->PrepareModifications() == B_OK;
|
||||
fCreateMenu->SetEnabled(true);
|
||||
BString supportedChildType;
|
||||
int32 cookie = 0;
|
||||
@ -522,6 +523,8 @@ fSurfaceTestMI->SetEnabled(false);
|
||||
if (fCreateMenu->CountItems() == 0)
|
||||
fprintf(stderr, "Failed to get supported child types: %s\n",
|
||||
strerror(ret));
|
||||
if (prepared)
|
||||
disk->CancelModifications();
|
||||
} else {
|
||||
fCreateMenu->SetEnabled(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user