Use default ammostore string size for weapons number instead of predefined const
authorunc0rr
Sat, 10 May 2008 13:44:30 +0000
changeset 923 b3d097097b54
parent 922 63c52f8d5cfd
child 924 227f9fcdc2f4
Use default ammostore string size for weapons number instead of predefined const
QTfrontend/pages.cpp
--- a/QTfrontend/pages.cpp	Fri May 09 20:03:53 2008 +0000
+++ b/QTfrontend/pages.cpp	Sat May 10 13:44:30 2008 +0000
@@ -635,13 +635,13 @@
 	pageLayout->addWidget(BtnBack, 1, 0);
 }
 
-PageSelectWeapon::PageSelectWeapon(QWidget* parent) : 
+PageSelectWeapon::PageSelectWeapon(QWidget* parent) :
   AbstractPage(parent)
 {
 	QGridLayout * pageLayout = new QGridLayout(this);
 	pageLayout->setMargin(25);
-        
-        pWeapons=new SelWeaponWidget(20, this);
+	
+	pWeapons=new SelWeaponWidget(cDefaultAmmoStore->size() - 10, this);
 	pageLayout->addWidget(pWeapons, 0, 0, 1, 4);
 
 	BtnBack = addButton(tr("Back"), pageLayout, 1, 0);