diff -r 943b258d5443 -r 5664ec82aed7 QTfrontend/ui/widget/selectWeapon.h --- a/QTfrontend/ui/widget/selectWeapon.h Sat Oct 07 01:05:55 2017 +0200 +++ b/QTfrontend/ui/widget/selectWeapon.h Sat Oct 07 03:43:06 2017 +0200 @@ -52,24 +52,29 @@ SelWeaponWidget(int numItems, QWidget* parent=0); QString getWeaponsString(const QString& name) const; QStringList getWeaponNames() const; + void deletionDone(); public slots: void setDefault(); void setWeapons(const QString& ammo); //sets the name of the current set void setWeaponsName(const QString& name); + void switchWeapons(const QString& name); void deleteWeaponsName(); void newWeaponsName(); void save(); void copy(); signals: - void weaponsChanged(); - void weaponsDeleted(); + void weaponsDeleted(QString weaponsName); + void weaponsAdded(QString weaponsName, QString ammo); + void weaponsEdited(QString oldWeaponsName, QString newWeaponsName, QString ammo); private: //the name of the current weapon set QString curWeaponsName; + //set to true while an entry is deleted. Used to avoid duplicate saving due to combobox change + bool isDeleting = false; QLineEdit* m_name;