# HG changeset patch
# User Chris Cannam
# Date 1191601890 0
# Node ID a66ff2059daeef1142b182b9695312e2395c1aac
# Parent  90b9cfb5b0bb7df073f410290e2837ddd9c1ee7e
* Add image layer icon (from GIMP)
* If you cancel the dialog that pops up when you click to insert a new
  image or text point, ensure that the point is not added

diff -r 90b9cfb5b0bb -r a66ff2059dae layer/ImageLayer.cpp
--- a/layer/ImageLayer.cpp	Fri Oct 05 16:05:23 2007 +0000
+++ b/layer/ImageLayer.cpp	Fri Oct 05 16:31:30 2007 +0000
@@ -613,7 +613,7 @@
 
     bool ok = false;
 
-    ImageDialog dialog(tr("Select image"), "", tr("<no label>"));
+    ImageDialog dialog(tr("Select image"), "", "");
 
     if (dialog.exec() == QDialog::Accepted) {
 
@@ -623,6 +623,8 @@
 	    new ImageModel::ChangeImageCommand
             (m_model, m_editingPoint, dialog.getImage(), dialog.getLabel());
 	m_editingCommand->addCommand(command);
+    } else {
+        m_editingCommand->deletePoint(m_editingPoint);
     }
 
     m_editingCommand->finish();
diff -r 90b9cfb5b0bb -r a66ff2059dae layer/TextLayer.cpp
--- a/layer/TextLayer.cpp	Fri Oct 05 16:05:23 2007 +0000
+++ b/layer/TextLayer.cpp	Fri Oct 05 16:31:30 2007 +0000
@@ -442,6 +442,8 @@
 	TextModel::RelabelCommand *command =
 	    new TextModel::RelabelCommand(m_model, m_editingPoint, label);
 	m_editingCommand->addCommand(command);
+    } else {
+        m_editingCommand->deletePoint(m_editingPoint);
     }
 
     m_editingCommand->finish();