~ubuntu-branches/ubuntu/quantal/kde4libs/quantal

« back to all changes in this revision

Viewing changes to plasma/applet.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-07-27 09:09:17 UTC
  • mto: (0.5.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 248.
  • Revision ID: package-import@ubuntu.com-20110727090917-40sz5hkh8yh17tf0
Tags: upstream-4.7.0
Import upstream version 4.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1651
1651
    }
1652
1652
 
1653
1653
    if (d->registeredAsDragHandle.remove(item)) {
1654
 
        item->removeSceneEventFilter(this);
 
1654
        if (item != this) {
 
1655
            item->removeSceneEventFilter(this);
 
1656
        }
1655
1657
    }
1656
1658
}
1657
1659
 
1797
1799
            break;
1798
1800
        }
1799
1801
 
1800
 
        return false;
1801
1802
    }
1802
1803
 
1803
1804
    switch (event->type()) {
2407
2408
        break;
2408
2409
    case ItemParentHasChanged:
2409
2410
        {
2410
 
            Containment *c = containment();
2411
 
            if (c && c->containmentType() == Containment::DesktopContainment) {
2412
 
                installSceneEventFilter(this);
2413
 
            } else {
 
2411
            if (isContainment()) {
2414
2412
                removeSceneEventFilter(this);
 
2413
            } else {
 
2414
                Containment *c = containment();
 
2415
                if (c && c->containmentType() == Containment::DesktopContainment) {
 
2416
                    installSceneEventFilter(this);
 
2417
                } else {
 
2418
                    removeSceneEventFilter(this);
 
2419
                }
2415
2420
            }
2416
2421
        }
2417
2422
        break;