Commit a301ef1e authored by Jan Möbius's avatar Jan Möbius

More intelligent update handling for selection flags

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7796 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 650f0c34
......@@ -219,7 +219,6 @@ bool BaseObject::target() {
void BaseObject::target(bool _target) {
setFlag("target", _target);
emit objectSelectionChanged(id());
}
bool BaseObject::source() {
......@@ -228,7 +227,6 @@ bool BaseObject::source() {
void BaseObject::source(bool _source) {
setFlag("source", _source);
emit objectSelectionChanged(id());
}
bool BaseObject::flag(QString _flag)
......@@ -240,15 +238,19 @@ void BaseObject::setFlag(QString _flag, bool _set)
{
if (flags_.contains(_flag))
{
if (!_set)
if (!_set) {
flags_.removeAll(_flag);
emit objectSelectionChanged(id());
}
}
else
{
if (_set)
if (_set) {
flags_ << _flag;
emit objectSelectionChanged(id());
}
}
emit objectSelectionChanged(id());
}
QStringList BaseObject::flags()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment