summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();
+ }
}
}