summaryrefslogtreecommitdiffstats
path: root/src/sp-item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-item.cpp')
-rw-r--r--src/sp-item.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 5e126f486..aec749929 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -183,6 +183,26 @@ bool SPItem::isHidden(unsigned display_key) const {
return true;
}
+bool SPItem::isHighlightSet() const {
+ return _highlightColor != NULL;
+}
+
+guint32 SPItem::highlight_color() const {
+ if (_highlightColor)
+ {
+ return atoi(_highlightColor) | 0x000000ff;
+ }
+ else if (parent && parent != this && SP_IS_ITEM(parent))
+ {
+ return SP_ITEM(parent)->highlight_color();
+ }
+ else
+ {
+ static Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ return prefs->getInt("/tools/nodes/highlight_color", 0xff0000ff) | 0x000000ff;
+ }
+}
+
void SPItem::setEvaluated(bool evaluated) {
_is_evaluated = evaluated;
_evaluated_status = StatusSet;