Added a BAlert to the "clear" button - doesn't work yet (not even pressing <enter>

for the default button does), but at least, the window itself is updated now :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12739 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-05-20 00:00:52 +00:00
parent 0fa7031a26
commit 4dfc2afb5b
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <Application.h>
#include <Alert.h>
#include <Box.h>
#include <Button.h>
#include <CheckBox.h>
@@ -223,9 +224,12 @@ ObjectWindow::MessageReceived(BMessage* message)
case MSG_NEW_OBJECT:
fObjectView->SetState(NULL);
break;
case MSG_CLEAR:
fObjectView->MakeEmpty();
case MSG_CLEAR: {
BAlert *alert = new BAlert("Playground", "Do you really want to clear all drawing objects?", "No", "Yes");
if (alert->Go() == 1)
fObjectView->MakeEmpty();
break;
}
case MSG_SET_PEN_SIZE:
fObjectView->SetStatePenSize(atof(fPenSizeTC->Text()));
break;