diff options
Diffstat (limited to 'src/gui/models/sortlistmodelbuy.h')
-rw-r--r-- | src/gui/models/sortlistmodelbuy.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/models/sortlistmodelbuy.h b/src/gui/models/sortlistmodelbuy.h index 2b2f56d12..19ef70cc6 100644 --- a/src/gui/models/sortlistmodelbuy.h +++ b/src/gui/models/sortlistmodelbuy.h @@ -28,7 +28,9 @@ #include "utils/gettext.h" -static const char *const SORT_NAME_BUY[7] = +#define NUM_ELEMENTS(a) sizeof(a) / sizeof(a[0]) + +static const char *const SORT_NAME_BUY[8] = { // TRANSLATORS: buy dialog sort type. N_("unsorted"), @@ -40,6 +42,8 @@ static const char *const SORT_NAME_BUY[7] = N_("by id"), // TRANSLATORS: buy dialog sort type. N_("by weight"), + // TRANSLATORS: inventory sort mode + N_("by total weight"), // TRANSLATORS: buy dialog sort type. N_("by amount"), // TRANSLATORS: buy dialog sort type. @@ -56,7 +60,7 @@ class SortListModelBuy final : public ListModel A_DELETE_COPY(SortListModelBuy) int getNumberOfElements() override final - { return 7; } + { return NUM_ELEMENTS(SORT_NAME_BUY); } std::string getElementAt(int i) override final { |