diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2019-01-06 18:02:17 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2019-01-06 18:02:17 +0100 |
commit | 6fe55641057153e1a8f4da2e377150acd8a8cbd3 (patch) | |
tree | 4dd3c6e77ca8699e5ee6f108124ed986842b1f06 /src/data | |
parent | ad519c0f0dfab503d41a59d7129fb9a6c9682860 (diff) |
fixed looseness/bend bug
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/edge.cpp | 4 | ||||
-rw-r--r-- | src/data/graphelementdata.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/data/edge.cpp b/src/data/edge.cpp index afb1e57..864d5ed 100644 --- a/src/data/edge.cpp +++ b/src/data/edge.cpp @@ -254,8 +254,6 @@ void Edge::updateData() _data->unsetProperty("bend right");
_data->unsetProperty("looseness");
- // TODO: style handling?
-
if (_basicBendMode) {
if (_bend != 0) {
QString bendKey;
@@ -280,7 +278,7 @@ void Edge::updateData() }
if (_source == _target) _data->setAtom("loop");
- if (!isSelfLoop() && !isStraight() && almostEqual(_weight, 0.4))
+ if (!isSelfLoop() && !isStraight() && !almostEqual(_weight, 0.4))
_data->setProperty("looseness", QString::number(_weight*2.5, 'f', 2));
if (_source->isBlankNode()) _sourceAnchor = "center";
else _sourceAnchor = "";
diff --git a/src/data/graphelementdata.cpp b/src/data/graphelementdata.cpp index f743bc5..cd09a6d 100644 --- a/src/data/graphelementdata.cpp +++ b/src/data/graphelementdata.cpp @@ -97,7 +97,8 @@ bool GraphElementData::hasProperty(QString key) bool GraphElementData::atom(QString atom)
{
- return (indexOfKey(atom) != -1);
+ int idx = indexOfKey(atom);
+ return (idx != -1 && _properties[idx].atom());
}
int GraphElementData::indexOfKey(QString key)
|