Skip to content

Commit

Permalink
Added block scope to switch labels in GuiEntityDialog ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Glover committed Mar 16, 2010
1 parent 103f54b commit 9bd6220
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/mapedit/gui_entity_dialog.cc
Expand Up @@ -384,21 +384,25 @@ GuiEntityDialog::GuiEntityDialog (MapEntity *entity, const GuiEntityDialog::Mode
world::placeable_type obj_type = entity->get_object_type();
switch (obj_type)
{
case world::OBJECT:
case world::OBJECT: {
widget = gtk_builder_get_object (Ui, "type_scenery");
set_page_active (1, false);
break;
case world::CHARACTER:
}
case world::CHARACTER: {
widget = gtk_builder_get_object (Ui, "type_character");
world::character *chr = dynamic_cast<world::character*>(entity->object());
if (chr != NULL) init_from_character (chr);
break;
case world::ITEM:
}
case world::ITEM: {
widget = gtk_builder_get_object (Ui, "type_item");
break;
default:
}
default: {
widget = NULL;
break;
}
}
if (widget != NULL)
{
Expand Down

0 comments on commit 9bd6220

Please sign in to comment.