summaryrefslogtreecommitdiff
path: root/src/gui/userpalette.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/userpalette.cpp')
-rw-r--r--src/gui/userpalette.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/userpalette.cpp b/src/gui/userpalette.cpp
index d0e6c2c9a..629caca73 100644
--- a/src/gui/userpalette.cpp
+++ b/src/gui/userpalette.cpp
@@ -371,3 +371,16 @@ void UserPalette::addColor(const unsigned type,
if (grad != GradientType::STATIC)
mGradVector.push_back(&mColors[type]);
}
+
+int UserPalette::getIdByChar(const signed char c, bool &valid) const
+{
+ const CharColors::const_iterator it = mCharColors.find(c);
+ if (it != mCharColors.end())
+ {
+ valid = true;
+ return (*it).second;
+ }
+
+ valid = false;
+ return 0;
+}