diff --git a/mapeditor/inspector/inspector.cpp b/mapeditor/inspector/inspector.cpp
index e575f660a..097cbc3df 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 c119bee1f..b8408b0f5 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 3464c45b2..ccd410aa8 100644
--- a/mapeditor/mainwindow.h
+++ b/mapeditor/mainwindow.h
@@ -102,6 +102,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 @@
+
+
+