summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-30 18:55:43 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-06-30 18:55:43 +0800
commit318271e14c181d63f1c713d27ee82031c3ddc786 (patch)
tree7368f1e0dd82af6afdc41debece2c37fb3c3c9b8
parent58879636ef24a21298614c6a9a19d201045938a0 (diff)
C catalog pointer is always saved when setting data
-rw-r--r--basket.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/basket.cxx b/basket.cxx
index 5a49e6b..c7aada0 100644
--- a/basket.cxx
+++ b/basket.cxx
@@ -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();
+ }
}
}