summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-01-27 22:03:02 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-01-27 22:03:02 +0000
commit5b962cdfdae8e7fee34211f7da4146eba5d763f9 (patch)
tree7ca839f8b4e6f2e67ed86915ba61641c0a10d714 /src/ui
parentupdate to trunk (diff)
parentProtect pdf and png exports from failure and output reasonalbe warnings. (diff)
downloadinkscape-5b962cdfdae8e7fee34211f7da4146eba5d763f9.tar.gz
inkscape-5b962cdfdae8e7fee34211f7da4146eba5d763f9.zip
update to trunk
(bzr r11950.1.237)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/template-load-tab.cpp7
-rw-r--r--src/ui/tools/text-tool.cpp4
-rw-r--r--src/ui/tools/tool-base.cpp7
-rw-r--r--src/ui/tools/tool-base.h1
4 files changed, 4 insertions, 15 deletions
diff --git a/src/ui/dialog/template-load-tab.cpp b/src/ui/dialog/template-load-tab.cpp
index 4f2d51ef7..6b1f4542f 100644
--- a/src/ui/dialog/template-load-tab.cpp
+++ b/src/ui/dialog/template-load-tab.cpp
@@ -220,12 +220,9 @@ TemplateLoadTab::TemplateData TemplateLoadTab::_processTemplateFile(const std::s
n = result.display_name.rfind(".svg");
result.display_name.replace(n, 4, 1, ' ');
- Inkscape::XML::Document *rdoc;
- rdoc = sp_repr_read_file(path.data(), SP_SVG_NS_URI);
- Inkscape::XML::Node *myRoot;
-
+ Inkscape::XML::Document *rdoc = sp_repr_read_file(path.data(), SP_SVG_NS_URI);
if (rdoc){
- myRoot = rdoc->root();
+ Inkscape::XML::Node *myRoot = rdoc->root();
if (strcmp(myRoot->name(), "svg:svg") != 0){ // Wrong file format
return result;
}
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index c73164c09..9b5ab1016 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -1335,7 +1335,7 @@ bool sp_text_paste_inline(ToolBase *ec)
paste_string_uchar == 0x00000009 ||
paste_string_uchar == 0x0000000A ||
paste_string_uchar == 0x0000000D) {
- itr++;
+ ++itr;
} else {
itr = text.erase(itr);
}
@@ -1637,7 +1637,7 @@ static void sp_text_context_update_text_selection(TextTool *tc)
// the selection update (can't do both atomically, alas)
if (!tc->desktop) return;
- for (std::vector<SPCanvasItem*>::iterator it = tc->text_selection_quads.begin() ; it != tc->text_selection_quads.end() ; it++) {
+ for (std::vector<SPCanvasItem*>::iterator it = tc->text_selection_quads.begin() ; it != tc->text_selection_quads.end() ; ++it) {
sp_canvas_item_hide(*it);
sp_canvas_item_destroy(*it);
}
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index 3b51147e0..cc028724a 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -98,7 +98,6 @@ ToolBase::ToolBase() {
this->hot_x = 0;
this->yp = 0;
this->within_tolerance = false;
- this->is_dragging = false;
this->tolerance = 0;
//this->key = 0;
this->item_to_select = 0;
@@ -979,14 +978,8 @@ gint sp_event_context_root_handler(ToolBase * event_context,
gint sp_event_context_virtual_root_handler(ToolBase * event_context, GdkEvent * event) {
gint ret = false;
if (event_context) {
- if(event->type == GDK_BUTTON_PRESS)
- event_context->is_dragging = true;
-
ret = event_context->root_handler(event);
set_event_location(event_context->desktop, event);
-
- if(event->type == GDK_BUTTON_RELEASE)
- event_context->is_dragging = false;
}
return ret;
}
diff --git a/src/ui/tools/tool-base.h b/src/ui/tools/tool-base.h
index ab8bd8caa..43edc4bd7 100644
--- a/src/ui/tools/tool-base.h
+++ b/src/ui/tools/tool-base.h
@@ -118,7 +118,6 @@ public:
gint xp, yp; ///< where drag started
gint tolerance;
- bool is_dragging; // Is a tool currently dragging something
bool within_tolerance; ///< are we still within tolerance of origin