diff --git a/coinkiller_data/icons/deselect.png b/coinkiller_data/icons/deselect.png
new file mode 100644
index 0000000..f4d4f73
Binary files /dev/null and b/coinkiller_data/icons/deselect.png differ
diff --git a/leveleditor/editmanager.cpp b/leveleditor/editmanager.cpp
index b76a3a3..a2235c2 100644
--- a/leveleditor/editmanager.cpp
+++ b/leveleditor/editmanager.cpp
@@ -886,6 +886,11 @@ void EditManager::selectAll()
foreach (ProgressPath* path, level->progressPaths) foreach (ProgressPathNode* node, path->getNodes()) selectedObjects.append(node);
}
+void EditManager::deselect()
+{
+ selectedObjects.clear();
+}
+
void EditManager::selectZoneContents(Zone* zone)
{
selectAll();
diff --git a/leveleditor/editmanager.h b/leveleditor/editmanager.h
index 0c0d6a4..fdca9fc 100644
--- a/leveleditor/editmanager.h
+++ b/leveleditor/editmanager.h
@@ -50,6 +50,7 @@ class EditManager : public QObject
void select(Object* obj);
void selectAll();
+ void deselect();
void selectZoneContents(Zone* zone);
diff --git a/leveleditor/leveleditorwindow.cpp b/leveleditor/leveleditorwindow.cpp
index a3a756c..da02109 100644
--- a/leveleditor/leveleditorwindow.cpp
+++ b/leveleditor/leveleditorwindow.cpp
@@ -66,6 +66,7 @@ LevelEditorWindow::LevelEditorWindow(LevelManager* lvlMgr, int initialArea) :
ui->actionCopy->setIcon((QIcon(basePath + "copy.png")));
ui->actionDelete->setIcon(QIcon(basePath + "delete.png"));
ui->actionSelectAll->setIcon(QIcon(basePath + "select_all.png"));
+ ui->actionDeselect->setIcon(QIcon(basePath + "deselect.png"));
ui->actionRaise->setIcon(QIcon(basePath + "raise.png"));
ui->actionLower->setIcon(QIcon(basePath + "lower.png"));
ui->actionRaiseLayer->setIcon(QIcon(basePath + "layer_up.png"));
@@ -423,6 +424,13 @@ void LevelEditorWindow::on_actionSelectAll_triggered()
levelView->selectAll();
}
+
+void LevelEditorWindow::on_actionDeselect_triggered()
+{
+ this->deselect();
+ levelView->deselect();
+}
+
void LevelEditorWindow::on_actionRaise_triggered()
{
levelView->raise();
@@ -967,3 +975,5 @@ void LevelEditorWindow::paintEvent(QPaintEvent* evt)
//ui->levelViewArea->horizontalScrollBar()->height()
}
#endif
+
+
diff --git a/leveleditor/leveleditorwindow.h b/leveleditor/leveleditorwindow.h
index ffa83ec..07dc3e9 100644
--- a/leveleditor/leveleditorwindow.h
+++ b/leveleditor/leveleditorwindow.h
@@ -128,6 +128,8 @@ private slots:
void on_actionSelectAll_triggered();
+ void on_actionDeselect_triggered();
+
void on_actionShowMinimap_toggled(bool checked);
void on_actionShowToolbox_toggled(bool checked);
diff --git a/leveleditor/leveleditorwindow.ui b/leveleditor/leveleditorwindow.ui
index 4541233..df02002 100644
--- a/leveleditor/leveleditorwindow.ui
+++ b/leveleditor/leveleditorwindow.ui
@@ -106,6 +106,7 @@
+
@@ -550,6 +551,17 @@
Preferences
+
+
+ Deselect
+
+
+ Deselect
+
+
+ Ctrl+Shift+A
+
+
diff --git a/leveleditor/levelview.cpp b/leveleditor/levelview.cpp
index bcab501..23f1bc0 100644
--- a/leveleditor/levelview.cpp
+++ b/leveleditor/levelview.cpp
@@ -776,6 +776,12 @@ void LevelView::selectAll()
update();
}
+void LevelView::deselect()
+{
+ editManager->deselect();
+ update();
+}
+
void LevelView::deleteSel()
{
editManager->deleteSelection();
diff --git a/leveleditor/levelview.h b/leveleditor/levelview.h
index 82e09a6..983e822 100644
--- a/leveleditor/levelview.h
+++ b/leveleditor/levelview.h
@@ -48,6 +48,7 @@ class LevelView : public QWidget
void paste();
void cut();
void selectAll();
+ void deselect();
void deleteSel();
void raise();
void lower();