diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-30 18:55:43 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-06-30 18:55:43 +0800 |
commit | 318271e14c181d63f1c713d27ee82031c3ddc786 (patch) | |
tree | 7368f1e0dd82af6afdc41debece2c37fb3c3c9b8 | |
parent | 58879636ef24a21298614c6a9a19d201045938a0 (diff) |
C catalog pointer is always saved when setting data
-rw-r--r-- | basket.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -63,13 +63,15 @@ namespace ICClient { void Basket::setData(icclient_ord_order* order) { - if (order) + if (order) { + this->m_data = order; for (size_t i = 0; i < order->nitems; i++) addItem(Item{order->items[i]}); - m_subtotal = order->subtotal; - emit subtotalChanged(); - m_totalCost = order->total_cost; - emit totalCostChanged(); + m_subtotal = order->subtotal; + emit subtotalChanged(); + m_totalCost = order->total_cost; + emit totalCostChanged(); + } } } |