diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-11-10 06:07:17 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-11-10 06:07:17 +0000 |
| commit | 6fadc1a815eca2b0a85038ae95d9dd7dbe8a8ae7 (patch) | |
| tree | 951c9b05d57c8ffe745561865253055ae2e8f566 /src | |
| parent | merge from trunk (r11858) (diff) | |
| parent | Win32. Updating the trunk again for devlibs r36. (diff) | |
| download | inkscape-6fadc1a815eca2b0a85038ae95d9dd7dbe8a8ae7.tar.gz inkscape-6fadc1a815eca2b0a85038ae95d9dd7dbe8a8ae7.zip | |
merge from trunk (r11865)
(bzr r11668.1.39)
Diffstat (limited to 'src')
| -rw-r--r-- | src/attribute-rel-util.cpp | 9 | ||||
| -rw-r--r-- | src/desktop.cpp | 13 | ||||
| -rw-r--r-- | src/display/drawing-shape.cpp | 2 | ||||
| -rw-r--r-- | src/display/drawing-text.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 50 | ||||
| -rw-r--r-- | src/ui/tool/node-tool.cpp | 4 |
6 files changed, 48 insertions, 32 deletions
diff --git a/src/attribute-rel-util.cpp b/src/attribute-rel-util.cpp index cf94c0c1e..38327b413 100644 --- a/src/attribute-rel-util.cpp +++ b/src/attribute-rel-util.cpp @@ -76,7 +76,14 @@ void sp_attribute_clean_recursive(Node *repr, unsigned int flags) { } for(Node *child=repr->firstChild() ; child ; child = child->next()) { - sp_attribute_clean_recursive( child, flags ); + + // Don't remove default css values if element is in <defs> or is a <symbol> + Glib::ustring element = child->name(); + unsigned int flags_temp = flags; + if( element.compare( "svg:defs" ) == 0 || element.compare( "svg:symbol" ) == 0 ) { + flags_temp &= ~(SP_ATTR_CLEAN_DEFAULT_WARN|SP_ATTR_CLEAN_DEFAULT_REMOVE); + } + sp_attribute_clean_recursive( child, flags_temp ); } } diff --git a/src/desktop.cpp b/src/desktop.cpp index fa0c8647f..f10174119 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -549,12 +549,17 @@ void SPDesktop::toggleLayerSolo(SPObject *object) { bool othersShowing = false; std::vector<SPObject*> layers; for ( SPObject* obj = Inkscape::next_layer(currentRoot(), object); obj; obj = Inkscape::next_layer(currentRoot(), obj) ) { - layers.push_back(obj); - othersShowing |= !SP_ITEM(obj)->isHidden(); + // Don't hide ancestors, since that would in turn hide the layer as well + if (!obj->isAncestorOf(object)) { + layers.push_back(obj); + othersShowing |= !SP_ITEM(obj)->isHidden(); + } } for ( SPObject* obj = Inkscape::previous_layer(currentRoot(), object); obj; obj = Inkscape::previous_layer(currentRoot(), obj) ) { - layers.push_back(obj); - othersShowing |= !SP_ITEM(obj)->isHidden(); + if (!obj->isAncestorOf(object)) { + layers.push_back(obj); + othersShowing |= !SP_ITEM(obj)->isHidden(); + } } diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 4ca306092..e80f12486 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -167,7 +167,7 @@ DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigne { Inkscape::DrawingContext::Save save(ct); ct.setSource(rgba); ct.setLineWidth(0.5); - ct.setTolerance(1.25); + ct.setTolerance(0.5); ct.stroke(); } } else { diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp index 7f63c555a..2a6505c67 100644 --- a/src/display/drawing-text.cpp +++ b/src/display/drawing-text.cpp @@ -162,7 +162,7 @@ unsigned DrawingText::_renderItem(DrawingContext &ct, Geom::IntRect const &/*are guint32 rgba = _drawing.outlinecolor; Inkscape::DrawingContext::Save save(ct); ct.setSource(rgba); - ct.setTolerance(1.25); // low quality, but good enough for outline mode + ct.setTolerance(0.5); // low quality, but good enough for outline mode for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { DrawingGlyphs *g = dynamic_cast<DrawingGlyphs *>(&*i); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index 4a6429fc5..693268b35 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -203,41 +203,36 @@ DocumentProperties::~DocumentProperties() * widget in columns 2-3; (non-0, 0) means label in columns 1-3; and * (non-0, non-0) means two widgets in columns 2 and 3. */ -inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned const n, int start = 0) +inline void attach_all(Gtk::Table &table, Gtk::Widget *const arr[], unsigned const n, int start = 0, int docum_prop_flag = 0) { - for (unsigned i = 0, r = start; i < n; i += 2) - { - if (arr[i] && arr[i+1]) - { - table.attach(*arr[i], 1, 2, r, r+1, - Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); - table.attach(*arr[i+1], 2, 3, r, r+1, - Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); - } - else - { + for (unsigned i = 0, r = start; i < n; i += 2) { + if (arr[i] && arr[i+1]) { + table.attach(*arr[i], 1, 2, r, r+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); + table.attach(*arr[i+1], 2, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); + } else { if (arr[i+1]) { Gtk::AttachOptions yoptions = (Gtk::AttachOptions)0; if (dynamic_cast<Inkscape::UI::Widget::PageSizer*>(arr[i+1])) { // only the PageSizer in Document Properties|Page should be stretched vertically yoptions = Gtk::FILL|Gtk::EXPAND; } - table.attach(*arr[i+1], 1, 3, r, r+1, - Gtk::FILL|Gtk::EXPAND, yoptions, 0,0); - } - else if (arr[i]) - { + if (docum_prop_flag) { + if( i==(n-4) || i==(n-6) ) { + table.attach(*arr[i+1], 1, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, yoptions, 20,0); + } else { + table.attach(*arr[i+1], 1, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, yoptions, 0,0); + } + } else { + table.attach(*arr[i+1], 1, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, yoptions, 0,0); + } + } else if (arr[i]) { Gtk::Label& label = reinterpret_cast<Gtk::Label&>(*arr[i]); label.set_alignment (0.0); - table.attach (label, 0, 3, r, r+1, - Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); - } - else - { + table.attach (label, 0, 3, r, r+1, Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0); + } else { Gtk::HBox *space = manage (new Gtk::HBox); space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y); - table.attach (*space, 0, 1, r, r+1, - (Gtk::AttachOptions)0, (Gtk::AttachOptions)0,0,0); + table.attach (*space, 0, 1, r, r+1, (Gtk::AttachOptions)0, (Gtk::AttachOptions)0,0,0); } } ++r; @@ -275,7 +270,12 @@ void DocumentProperties::build_page() _rcp_bord._label, &_rcp_bord, }; - attach_all(_page_page.table(), widget_array, G_N_ELEMENTS(widget_array)); + std::list<Gtk::Widget*> _slaveList; + _slaveList.push_back(&_rcb_bord); + _slaveList.push_back(&_rcb_shad); + _rcb_canb.setSlaveWidgets(_slaveList); + + attach_all(_page_page.table(), widget_array, G_N_ELEMENTS(widget_array),0,1); } void DocumentProperties::build_guides() diff --git a/src/ui/tool/node-tool.cpp b/src/ui/tool/node-tool.cpp index b532c8b65..7b6502ec3 100644 --- a/src/ui/tool/node-tool.cpp +++ b/src/ui/tool/node-tool.cpp @@ -197,6 +197,10 @@ void ink_node_tool_dispose(GObject *object) nt->enableGrDrag(false); + if (nt->flash_tempitem) { + nt->desktop->remove_temporary_canvasitem(nt->flash_tempitem); + } + nt->_selection_changed_connection.disconnect(); nt->_selection_modified_connection.disconnect(); nt->_mouseover_changed_connection.disconnect(); |
