Commit 8fc57bb3 authored by Colomban Wendling's avatar Colomban Wendling
Browse files

Pass the copied item in Stack.item_added() rather than the original one (oops)

parent c3c6fda7
......@@ -56,16 +56,17 @@ namespace OVCC
return this._stack.is_empty ();
}
private void add_nth (Tile t,
private void add_nth (Tile tile,
int n)
{
this._stack.push_nth (t.dup (), n);
var t = tile.dup ();
this._stack.push_nth (t, n);
this.item_added (t);
}
public void add (Tile t)
{
this.add_nth (t, Random.int_range (0, (int32)this.size + 1));
this.item_added (t);
this.notify_property ("size");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment