[Kst] [Bug 120882] "Raise to Top" and "Lower to Bottom" have no effect
Andrew Walker
arwalker at sumusltd.com
Fri Jan 27 23:52:31 CET 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=120882
arwalker sumusltd com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From arwalker sumusltd com 2006-01-27 23:52 -------
SVN commit 503033 by arwalker:
BUG:120882 Disable raise and lower menu items if they will have no effect.
M +18 -5 kstviewobject.cpp
--- trunk/extragear/graphics/kst/kst/kstviewobject.cpp #503032:503033
@ -1080,7 +1080,8 @
bool rc = false;
int id;
-
+ int index;
+
_moveToMap.clear();
if (!tagName().isEmpty()) {
@ -1098,23 +1099,35 @
}
if (_layoutActions & Raise) {
- menu->insertItem(i18n("&Raise"), this, SLOT(raise()));
+ index = menu->insertItem(i18n("&Raise"), this, SLOT(raise()));
rc = true;
+ if (_parent && !_parent->_children.empty() && _parent->_children.last().data() == this) {
+ menu->setItemEnabled(index, false);
+ }
}
if (_layoutActions & Lower) {
- menu->insertItem(i18n("&Lower"), this, SLOT(lower()));
+ index = menu->insertItem(i18n("&Lower"), this, SLOT(lower()));
rc = true;
+ if (_parent && !_parent->_children.empty() && _parent->_children.first().data() == this) {
+ menu->setItemEnabled(index, false);
+ }
}
if (_layoutActions & RaiseToTop) {
- menu->insertItem(i18n("Raise to &Top"), this, SLOT(raiseToTop()));
+ index = menu->insertItem(i18n("Raise to &Top"), this, SLOT(raiseToTop()));
rc = true;
+ if (_parent && !_parent->_children.empty() && _parent->_children.last().data() == this) {
+ menu->setItemEnabled(index, false);
+ }
}
if (_layoutActions & LowerToBottom) {
- menu->insertItem(i18n("Lower to &Bottom"), this, SLOT(lowerToBottom()));
+ index = menu->insertItem(i18n("Lower to &Bottom"), this, SLOT(lowerToBottom()));
rc = true;
+ if (_parent && !_parent->_children.empty() && _parent->_children.first().data() == this) {
+ menu->setItemEnabled(index, false);
+ }
}
if (_layoutActions & Rename) {
More information about the Kst
mailing list