diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/filebrowser/FileBrowserActivity.cpp | 2 | ||||
| -rw-r--r-- | src/game/Tool.cpp | 3 | ||||
| -rw-r--r-- | src/interface/Panel.cpp | 2 | ||||
| -rw-r--r-- | src/save/LocalSaveActivity.cpp | 1 | ||||
| -rw-r--r-- | src/simulation/elements/STOR.cpp | 1 |
5 files changed, 7 insertions, 2 deletions
diff --git a/src/filebrowser/FileBrowserActivity.cpp b/src/filebrowser/FileBrowserActivity.cpp index b8e18bf..0ea7104 100644 --- a/src/filebrowser/FileBrowserActivity.cpp +++ b/src/filebrowser/FileBrowserActivity.cpp @@ -68,7 +68,7 @@ class LoadFilesTask: public Task { std::vector<unsigned char> data = Client::Ref().ReadFile(*iter); GameSave * tempSave = new GameSave(data); - saveFile->SetGameSave(tempSave); + saveFile->SetGameSave(tempSave); saveFiles.push_back(saveFile); std::string filename = *iter; diff --git a/src/game/Tool.cpp b/src/game/Tool.cpp index 7fa8e15..5be44b6 100644 --- a/src/game/Tool.cpp +++ b/src/game/Tool.cpp @@ -110,7 +110,8 @@ void WallTool::DrawRect(Simulation * sim, Brush * brush, ui::Point position1, ui sim->CreateWallBox(position1.X, position1.Y, position2.X, position2.Y, toolID, 0); } void WallTool::DrawFill(Simulation * sim, Brush * brush, ui::Point position) { - sim->FloodWalls(position.X, position.Y, toolID, -1, -1, 0); + if (toolID != WL_STREAM) + sim->FloodWalls(position.X, position.Y, toolID, -1, -1, 0); } diff --git a/src/interface/Panel.cpp b/src/interface/Panel.cpp index d673037..b78a2cc 100644 --- a/src/interface/Panel.cpp +++ b/src/interface/Panel.cpp @@ -82,6 +82,8 @@ void Panel::RemoveChild(Component* c) { //remove child from parent. Does not free memory children.erase(children.begin() + i); + if (this->GetParentWindow()->IsFocused(c)) + this->GetParentWindow()->FocusComponent(NULL); break; } } diff --git a/src/save/LocalSaveActivity.cpp b/src/save/LocalSaveActivity.cpp index b57a993..96296f0 100644 --- a/src/save/LocalSaveActivity.cpp +++ b/src/save/LocalSaveActivity.cpp @@ -48,6 +48,7 @@ LocalSaveActivity::LocalSaveActivity(SaveFile save, FileSavedCallback * callback filenameField->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; filenameField->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; AddComponent(filenameField); + FocusComponent(filenameField); ui::Button * cancelButton = new ui::Button(ui::Point(0, Size.Y-16), ui::Point(Size.X-75, 16), "Cancel"); cancelButton->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; diff --git a/src/simulation/elements/STOR.cpp b/src/simulation/elements/STOR.cpp index c6064cd..fd82b7a 100644 --- a/src/simulation/elements/STOR.cpp +++ b/src/simulation/elements/STOR.cpp @@ -61,6 +61,7 @@ int Element_STOR::update(UPDATE_FUNC_ARGS) continue; if (!parts[i].tmp && !parts[i].life && (r&0xFF)!=PT_STOR && !(sim->elements[(r&0xFF)].Properties&TYPE_SOLID) && (!parts[i].ctype || (r&0xFF)==parts[i].ctype)) { + if ((r&0xFF) == PT_SOAP) sim->detach(r>>8); parts[i].tmp = parts[r>>8].type; parts[i].temp = parts[r>>8].temp; parts[i].tmp2 = parts[r>>8].life; |
