From 6a0cb32b7ee781857cec0fcc4676ce3607bfb339 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 16 May 2012 14:30:02 +0200 Subject: [PATCH] removed unnecessary code --- apps/openmw/mwgui/container.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index 844d5d89a4..bdb06dd26e 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -424,19 +424,16 @@ void ContainerWindow::onTakeAllButtonClicked(MyGUI::Widget* _sender) int i=0; for (MWWorld::ContainerStoreIterator iter (containerStore.begin()); iter!=containerStore.end(); ++iter) { - if(iter->getRefData().getCount() > 0) + playerStore.add(*iter); + + if (i==0) { - playerStore.add(*iter); - - if (i==0) - { - // play the sound of the first object - std::string sound = MWWorld::Class::get(*iter).getUpSoundId(*iter); - MWBase::Environment::get().getSoundManager()->playSound (sound, 1.0, 1.0); - } - - ++i; + // play the sound of the first object + std::string sound = MWWorld::Class::get(*iter).getUpSoundId(*iter); + MWBase::Environment::get().getSoundManager()->playSound (sound, 1.0, 1.0); } + + ++i; } containerStore.clear();