|
@@ -618,7 +618,7 @@ void Map::_floodFillCollisionElevation(int x, int y, uint collision, uint elevat
|
618
|
618
|
|
619
|
619
|
void Map::undo() {
|
620
|
620
|
if (blockdata) {
|
621
|
|
- Blockdata *commit = history.pop();
|
|
621
|
+ Blockdata *commit = history.back();
|
622
|
622
|
if (commit != NULL) {
|
623
|
623
|
blockdata->copyFrom(commit);
|
624
|
624
|
emit mapChanged(this);
|
|
@@ -638,7 +638,7 @@ void Map::redo() {
|
638
|
638
|
|
639
|
639
|
void Map::commit() {
|
640
|
640
|
if (blockdata) {
|
641
|
|
- if (!blockdata->equals(history.history.at(history.head))) {
|
|
641
|
+ if (!blockdata->equals(history.current())) {
|
642
|
642
|
Blockdata* commit = blockdata->copy();
|
643
|
643
|
history.push(commit);
|
644
|
644
|
emit mapChanged(this);
|