[kgraphviewer-devel] [kgraphviewer/libkgraphviz] src/kgraphviz: Fix background coloring for graph elements
Kevin Funk
krf at electrostorm.net
Thu Jan 27 15:10:44 CET 2011
Git commit 75c0d68ec15a48b9fbe82bac75963da7f003eb83 by Kevin Funk.
Pushed by kfunk into branch 'libkgraphviz'.
Fix background coloring for graph elements
M +1 -8 src/kgraphviz/dotgraph.cpp
M +1 -1 src/kgraphviz/graphelement.h
http://commits.kde.org/9c7b74a4/75c0d68ec15a48b9fbe82bac75963da7f003eb83
diff --git a/src/kgraphviz/dotgraph.cpp b/src/kgraphviz/dotgraph.cpp
index 897039d..b7051d2 100644
--- a/src/kgraphviz/dotgraph.cpp
+++ b/src/kgraphviz/dotgraph.cpp
@@ -1061,14 +1061,7 @@ void DotGraph::renameNode(const QString& oldNodeName, const QString& newNodeName
QString DotGraph::backColor() const
{
- if (m_attributes.find("bgcolor") != m_attributes.end())
- {
- return m_attributes["bgcolor"];
- }
- else
- {
- return QString();
- }
+ return m_attributes.value("bgcolor");
}
QTextStream& KGraphViz::operator<<(QTextStream& s, const KGraphViz::DotGraph& graph)
diff --git a/src/kgraphviz/graphelement.h b/src/kgraphviz/graphelement.h
index 1c2cd0e..33ea9be 100644
--- a/src/kgraphviz/graphelement.h
+++ b/src/kgraphviz/graphelement.h
@@ -53,7 +53,7 @@ public:
inline void setShape(const QString& lc) {m_attributes["shape"]=lc;}
inline void setColor(const QString& nt) {m_attributes["color"]=nt;}
inline void setLineColor(const QString& nt) {m_attributes["color"]=nt;}
- inline void setBackColor(const QString& nc) {m_attributes["bgcolor"]=nc;}
+ inline void setBackColor(const QString& nc) {m_attributes["fillcolor"]=nc;}
inline QString id() const {return m_attributes["id"];}
inline QString style() const {return m_attributes["style"];}
More information about the kgraphviewer-devel
mailing list