diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-19 00:14:03 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2016-03-19 00:14:03 +0000 |
| commit | 04a8c5b6ee2cbadf792295bbdb4048369103f32c (patch) | |
| tree | b72051b7eea37526fb9428e822de28365a0c217e /src | |
| parent | Fix more Krzysztof comments on merge proposal, temporary disable LPE on clip ... (diff) | |
| parent | Remove code of a semifixed bug (diff) | |
| download | inkscape-04a8c5b6ee2cbadf792295bbdb4048369103f32c.tar.gz inkscape-04a8c5b6ee2cbadf792295bbdb4048369103f32c.zip | |
update to trunk
(bzr r13708.1.45)
Diffstat (limited to 'src')
| -rw-r--r-- | src/desktop-style.cpp | 6 | ||||
| -rw-r--r-- | src/extension/implementation/implementation.h | 24 | ||||
| -rw-r--r-- | src/extension/implementation/script.cpp | 24 | ||||
| -rw-r--r-- | src/extension/init.cpp | 2 | ||||
| -rw-r--r-- | src/extension/output.cpp | 3 | ||||
| -rw-r--r-- | src/live_effects/parameter/path.cpp | 7 | ||||
| -rw-r--r-- | src/sp-text.cpp | 4 | ||||
| -rw-r--r-- | src/ui/tool/path-manipulator.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/text-toolbar.cpp | 8 |
9 files changed, 41 insertions, 39 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp index c28302d22..d10c75cd8 100644 --- a/src/desktop-style.cpp +++ b/src/desktop-style.cpp @@ -1004,10 +1004,10 @@ objects_query_paintorder (const std::vector<SPItem*> &objects, SPStyle *style_re n_order ++; - if (!prev_order.empty() && prev_order.compare( style->paint_order.value ) != 0) { - same_order = false; - } if (style->paint_order.set) { + if (!prev_order.empty() && prev_order.compare( style->paint_order.value ) != 0) { + same_order = false; + } prev_order = style->paint_order.value; } } diff --git a/src/extension/implementation/implementation.h b/src/extension/implementation/implementation.h index f6f933aaf..1232ae0c8 100644 --- a/src/extension/implementation/implementation.h +++ b/src/extension/implementation/implementation.h @@ -18,7 +18,7 @@ #include <2geom/forward.h> namespace Gtk { - class Widget; + class Widget; } class SPDocument; @@ -33,7 +33,7 @@ class View; } // namespace UI namespace XML { - class Node; + class Node; } // namespace XML namespace Extension { @@ -51,18 +51,18 @@ namespace Implementation { */ class ImplementationDocumentCache { - /** + /** * The document that this instance is working on. */ - Inkscape::UI::View::View * _view; + Inkscape::UI::View::View * _view; public: - ImplementationDocumentCache (Inkscape::UI::View::View * view) : - _view(view) - { - return; - }; - virtual ~ImplementationDocumentCache ( ) { return; }; - Inkscape::UI::View::View const * view ( ) { return _view; }; + ImplementationDocumentCache (Inkscape::UI::View::View * view) : + _view(view) + { + return; + }; + virtual ~ImplementationDocumentCache ( ) { return; }; + Inkscape::UI::View::View const * view ( ) { return _view; }; }; /** @@ -116,7 +116,7 @@ public: // ----- Effect functions ----- /** Find out information about the file. */ virtual Gtk::Widget * prefs_effect(Inkscape::Extension::Effect *module, - Inkscape::UI::View::View *view, + Inkscape::UI::View::View *view, sigc::signal<void> *changeSignal, ImplementationDocumentCache *docCache); virtual void effect(Inkscape::Extension::Effect * /*module*/, diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 4cb0c9b73..2ec17f947 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -152,7 +152,7 @@ Script::Script() : } /** - * brief Destructor + * \brief Destructor */ Script::~Script() { @@ -232,11 +232,7 @@ bool Script::check_existence(const std::string &command) //Don't search when it is an absolute path. */ if (Glib::path_is_absolute(command)) { - if (Glib::file_test(command, Glib::FILE_TEST_EXISTS)) { - return true; - } else { - return false; - } + return Glib::file_test(command, Glib::FILE_TEST_EXISTS); } // First search in the current directory @@ -280,9 +276,9 @@ bool Script::check_existence(const std::string &command) /** \return none - \brief This function 'loads' an extention, basically it determines - the full command for the extention and stores that. - \param module The extention to be loaded. + \brief This function 'loads' an extension, basically it determines + the full command for the extension and stores that. + \param module The extension to be loaded. The most difficult part about this function is finding the actual command through all of the Reprs. Basically it is hidden down a @@ -292,7 +288,7 @@ bool Script::check_existence(const std::string &command) At that point all of the loops are exited, and there is an if statement to make sure they didn't exit because of not finding - the command. If that's the case, the extention doesn't get loaded + the command. If that's the case, the extension doesn't get loaded and should error out at a higher level. */ @@ -545,17 +541,17 @@ SPDocument *Script::open(Inkscape::Extension::Input *module, /** \return none - \brief This function uses an extention to save a document. It first + \brief This function uses an extension to save a document. It first creates an SVG file of the document, and then runs it through the script. - \param module Extention to be used + \param module Extension to be used \param doc Document to be saved \param filename The name to save the final file as \return false in case of any failure writing the file, otherwise true Well, at some point people need to save - it is really what makes the entire application useful. And, it is possible that someone - would want to use an extetion for this, so we need a function to + would want to use an extension for this, so we need a function to do that eh? First things first, the document is saved to a temporary file that @@ -563,7 +559,7 @@ SPDocument *Script::open(Inkscape::Extension::Input *module, ink_ext_ as a prefix. Don't worry, this file gets deleted at the end of the function. - After we have the SVG file, then extention_execute is called with + After we have the SVG file, then Script::execute is called with the temporary file name and the final output filename. This should put the output of the script into the final output file. We then delete the temporary file. diff --git a/src/extension/init.cpp b/src/extension/init.cpp index c16a5a899..af7af2cb1 100644 --- a/src/extension/init.cpp +++ b/src/extension/init.cpp @@ -1,6 +1,6 @@ /* * This is what gets executed to initialize all of the modules. For - * the internal modules this invovles executing their initialization + * the internal modules this involves executing their initialization * functions, for external ones it involves reading their .spmodule * files and bringing them into Sodipodi. * diff --git a/src/extension/output.cpp b/src/extension/output.cpp index 8de5583c7..83f0fed2f 100644 --- a/src/extension/output.cpp +++ b/src/extension/output.cpp @@ -192,8 +192,7 @@ Output::prefs (void) delete dialog; - if (response == Gtk::RESPONSE_OK) return true; - return false; + return (response == Gtk::RESPONSE_OK); } /** diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index e0369e662..7ea1d465c 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -294,7 +294,12 @@ void PathParam::set_new_value (Geom::PathVector const &newpath, bool write_to_svg) { remove_link(); - _pathvector = newpath; + if (newpath.empty()) { + param_set_and_write_default(); + return; + } else { + _pathvector = newpath; + } must_recalculate_pwd2 = true; if (write_to_svg) { diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 4a5b1b1d6..7d4348d19 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -819,8 +819,8 @@ void TextTagAttributes::setFirstXY(Geom::Point &point) attributes.x.resize(1, zero_length); if (attributes.y.empty()) attributes.y.resize(1, zero_length); - attributes.x[0].computed = point[Geom::X]; - attributes.y[0].computed = point[Geom::Y]; + attributes.x[0] = point[Geom::X]; + attributes.y[0] = point[Geom::Y]; } void TextTagAttributes::mergeInto(Inkscape::Text::Layout::OptionalTextTagAttrs *output, Inkscape::Text::Layout::OptionalTextTagAttrs const &parent_attrs, unsigned parent_attrs_offset, bool copy_xy, bool copy_dxdyrotate) const diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index f4790c317..3b25439f3 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -1492,7 +1492,6 @@ void PathManipulator::_getGeometry() void PathManipulator::_setGeometry() { using namespace Inkscape::LivePathEffect; - if (empty()) return; if (!_lpe_key.empty()) { // copied from nodepath.cpp @@ -1505,6 +1504,7 @@ void PathManipulator::_setGeometry() LIVEPATHEFFECT(_path)->requestModified(SP_OBJECT_MODIFIED_FLAG); } } else { + if (empty()) return; //XML Tree being used here directly while it shouldn't be. if (_path->getRepr()->attribute("inkscape:original-d")) _path->set_original_curve(_spcurve, false, false); diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index c49f0bc05..60e932338 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -1106,9 +1106,11 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/ lh_unit = unit_table.getUnit("%"); height = query.line_height.value * 100; } else { - lh_unit = tracker->getActiveUnit(); - // Can get unit like this: unit_table.getUnit(query.line_height.unit); - height = Inkscape::Util::Quantity::convert(query.line_height.computed, "px", lh_unit); + //Unit const *active = tracker->getActiveUnit(); + // This allows us to show the unit stored to the user, but right now + // it's always px (because Tav said other units are broken/2016) + lh_unit = unit_table.getUnit(query.line_height.unit); + height = query.line_height.computed; } // Set before value is set |
