+ // For this tool, we check first to see if anything is selected. If so, we
+ // delete those and *don't* select the delete tool.
+ if (drawing->document.ItemsSelected() > 0)
+ {
+ drawing->document.DeleteSelectedItems();
+ drawing->update();
+ deleteAct->setChecked(false);
+ return;
+ }
+
+ // Otherwise, toggle the state of the tool