Skip to content

Commit

Permalink
Map: Create undo steps for map parts in importMap()
Browse files Browse the repository at this point in the history
Fixes #1168.
  • Loading branch information
dg0yt committed Oct 30, 2018
1 parent f25bd79 commit 19a3dfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
#include "gui/map/map_widget.h"
#include "gui/text_browser_dialog.h"
#include "templates/template.h"
#include "undo/map_part_undo.h"
#include "undo/object_undo.h"
#include "undo/undo.h"
#include "undo/undo_manager.h"
Expand Down Expand Up @@ -992,6 +993,7 @@ QHash<const Symbol*, Symbol*> Map::importMap(
// Import as new part
dest_part = new MapPart(part_to_import->getName(), this);
addPart(dest_part, 0);
push(new MapPartUndoStep(this, MapPartUndoStep::RemoveMapPart, 0));
}
}

Expand Down

0 comments on commit 19a3dfc

Please sign in to comment.