diff --git a/mapeditor/inspector/inspector.cpp b/mapeditor/inspector/inspector.cpp
index b5a26a41f..e2bd905aa 100644
--- a/mapeditor/inspector/inspector.cpp
+++ b/mapeditor/inspector/inspector.cpp
@@ -67,7 +67,8 @@ void Initializer::initialize(CGCreature * o)
if(!o) return;
o->character = CGCreature::Character::HOSTILE;
- o->putStack(SlotID(0), new CStackInstance(CreatureID(o->subID), 0, false));
+ if(!o->hasStackAtSlot(SlotID(0)))
+ o->putStack(SlotID(0), new CStackInstance(CreatureID(o->subID), 0, false));
}
void Initializer::initialize(CGDwelling * o)
diff --git a/mapeditor/mainwindow.cpp b/mapeditor/mainwindow.cpp
index 73b6d1524..c57dd2cef 100644
--- a/mapeditor/mainwindow.cpp
+++ b/mapeditor/mainwindow.cpp
@@ -1126,3 +1126,31 @@ void MainWindow::on_actionRecreate_obstacles_triggered()
}
+
+void MainWindow::on_actionCut_triggered()
+{
+ if(controller.map())
+ {
+ controller.copyToClipboard(mapLevel);
+ controller.commitObjectErase(mapLevel);
+ }
+}
+
+
+void MainWindow::on_actionCopy_triggered()
+{
+ if(controller.map())
+ {
+ controller.copyToClipboard(mapLevel);
+ }
+}
+
+
+void MainWindow::on_actionPaste_triggered()
+{
+ if(controller.map())
+ {
+ controller.pasteFromClipboard(mapLevel);
+ }
+}
+
diff --git a/mapeditor/mainwindow.h b/mapeditor/mainwindow.h
index a728c87dc..c3c30874a 100644
--- a/mapeditor/mainwindow.h
+++ b/mapeditor/mainwindow.h
@@ -98,6 +98,12 @@ private slots:
void switchDefaultPlayer(const PlayerColor &);
+ void on_actionCut_triggered();
+
+ void on_actionCopy_triggered();
+
+ void on_actionPaste_triggered();
+
public slots:
void treeViewSelected(const QModelIndex &selected, const QModelIndex &deselected);
diff --git a/mapeditor/mainwindow.ui b/mapeditor/mainwindow.ui
index 6da92787e..766114052 100644
--- a/mapeditor/mainwindow.ui
+++ b/mapeditor/mainwindow.ui
@@ -79,6 +79,9 @@
+
+
+