Mercurial > hg > svgui
changeset 307:a66ff2059dae
* 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
author | Chris Cannam |
---|---|
date | Fri, 05 Oct 2007 16:31:30 +0000 |
parents | 90b9cfb5b0bb |
children | cda569dfbdfe |
files | layer/ImageLayer.cpp layer/TextLayer.cpp |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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();
--- 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();