From 3329985ec81c08006b6a5fe7c9fe0b81d956ad3f Mon Sep 17 00:00:00 2001 From: chr Date: Thu, 18 May 2017 19:58:59 +0200 Subject: object manager panel: fix clip/mask icons missing icon delayed inkscape startup of about 3-5 seconds (bzr r15698.1.4) --- src/ui/dialog/objects.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/ui/dialog/objects.cpp') diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp index c7c696cdc..6b28c3b2f 100644 --- a/src/ui/dialog/objects.cpp +++ b/src/ui/dialog/objects.cpp @@ -350,7 +350,10 @@ void ObjectsPanel::_addObject(SPObject* obj, Gtk::TreeModel::Row* parentRow) row[_model->_colLocked] = !item->isSensitive(); row[_model->_colType] = group ? (group->layerMode() == SPGroup::LAYER ? 2 : 1) : 0; row[_model->_colHighlight] = item->isHighlightSet() ? item->highlight_color() : item->highlight_color() & 0xffffff00; - row[_model->_colClipMask] = item->clip_ref && item->clip_ref->getObject() ? 1 : (item->mask_ref && item->mask_ref->getObject() ? 2 : 0); + row[_model->_colClipMask] = item ? ( + (item->clip_ref && item->clip_ref->getObject() ? 1 : 0) | + (item->mask_ref && item->mask_ref->getObject() ? 2 : 0) + ) : 0; //row[_model->_colInsertOrder] = group ? (group->insertBottom() ? 2 : 1) : 0; //If our parent object is a group and it's expanded, expand the tree @@ -413,7 +416,10 @@ bool ObjectsPanel::_checkForUpdated(const Gtk::TreeIter& iter, SPObject* obj) row[_model->_colLocked] = item ? !item->isSensitive() : false; row[_model->_colType] = group ? (group->layerMode() == SPGroup::LAYER ? 2 : 1) : 0; row[_model->_colHighlight] = item ? (item->isHighlightSet() ? item->highlight_color() : item->highlight_color() & 0xffffff00) : 0; - row[_model->_colClipMask] = item ? (item->clip_ref && item->clip_ref->getObject() ? 1 : (item->mask_ref && item->mask_ref->getObject() ? 2 : 0)) : 0; + row[_model->_colClipMask] = item ? ( + (item->clip_ref && item->clip_ref->getObject() ? 1 : 0) | + (item->mask_ref && item->mask_ref->getObject() ? 2 : 0) + ) : 0; //row[_model->_colInsertOrder] = group ? (group->insertBottom() ? 2 : 1) : 0; return true; -- cgit v1.2.3