summaryrefslogtreecommitdiffstats
path: root/src/ui/clipboard.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-03-15 21:57:03 +0000
committerJabiertxof <jtx@jtx.marker.es>2016-03-15 21:57:03 +0000
commit6bd1c2a30b66e15fe055b22bd47dadb771f7fae2 (patch)
tree1b991cc2736f84fb069666802d485bd29cff6394 /src/ui/clipboard.cpp
parentUpdate to limit options to radius = 0, radious > 0 or both (diff)
parentfix-bug-1557192. paint-order crash with multiple items (diff)
downloadinkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.tar.gz
inkscape-6bd1c2a30b66e15fe055b22bd47dadb771f7fae2.zip
Update to trunk
(bzr r13645.1.119)
Diffstat (limited to 'src/ui/clipboard.cpp')
-rw-r--r--src/ui/clipboard.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index 816daf2e5..f04d8a591 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -525,7 +525,7 @@ bool ClipboardManagerImpl::pasteSize(SPDesktop *desktop, bool separately, bool a
// resize each object in the selection
if (separately) {
std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();i++){
+ for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (item) {
Geom::OptRect obj_size = item->desktopVisualBounds();
@@ -565,7 +565,7 @@ bool ClipboardManagerImpl::pastePathEffect(SPDesktop *desktop)
}
Inkscape::Selection *selection = desktop->getSelection();
- if (selection && selection->isEmpty()) {
+ if (!selection || selection->isEmpty()) {
_userWarn(desktop, _("Select <b>object(s)</b> to paste live path effect to."));
return false;
}
@@ -581,7 +581,7 @@ bool ClipboardManagerImpl::pastePathEffect(SPDesktop *desktop)
// make sure all selected items are converted to paths first (i.e. rectangles)
sp_selected_to_lpeitems(desktop);
std::vector<SPItem*> itemlist=selection->itemList();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();i++){
+ for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
_applyPathEffect(item, effectstack);
}
@@ -665,7 +665,7 @@ void ClipboardManagerImpl::_copySelection(Inkscape::Selection *selection)
// copy the defs used by all items
std::vector<SPItem*> itemlist=selection->itemList();
cloned_elements.clear();
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();i++){
+ for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){
SPItem *item = *i;
if (item) {
_copyUsedDefs(item);
@@ -676,23 +676,23 @@ void ClipboardManagerImpl::_copySelection(Inkscape::Selection *selection)
// copy the representation of the items
std::vector<SPObject*> sorted_items;
- for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();i++)
+ for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i)
sorted_items.push_back(*i);
sort(sorted_items.begin(),sorted_items.end(),sp_object_compare_position_bool);
//remove already copied elements from cloned_elements
std::vector<SPItem*>tr;
- for(std::set<SPItem*>::iterator it = cloned_elements.begin();it!=cloned_elements.end();it++){
+ for(std::set<SPItem*>::iterator it = cloned_elements.begin();it!=cloned_elements.end();++it){
if(std::find(sorted_items.begin(),sorted_items.end(),*it)!=sorted_items.end())
tr.push_back(*it);
}
- for(std::vector<SPItem*>::iterator it = tr.begin();it!=tr.end();it++){
+ for(std::vector<SPItem*>::iterator it = tr.begin();it!=tr.end();++it){
cloned_elements.erase(*it);
}
sorted_items.insert(sorted_items.end(),cloned_elements.begin(),cloned_elements.end());
- for(std::vector<SPObject*>::const_iterator i=sorted_items.begin();i!=sorted_items.end();i++){
+ for(std::vector<SPObject*>::const_iterator i=sorted_items.begin();i!=sorted_items.end();++i){
SPItem *item = dynamic_cast<SPItem*>(*i);
if (item) {
Inkscape::XML::Node *obj = item->getRepr();