button.buttonGroupId is always >= 0 now

parent 6f519527
......@@ -47,7 +47,7 @@ struct KoToolButton {
QToolButton *button; ///< a newly created button.
QString section; ///< The section the button wants to be in.
int priority; ///< Lower number (higher priority) means coming first in the section.
int buttonGroupId; ///< An unique ID for this button as passed by changedTool()
int buttonGroupId; ///< A unique ID for this tool as passed by changedTool(), >= 0
QString visibilityCode; ///< This button should become visible when we emit this string in toolCodesSelected()
};
......
......@@ -161,10 +161,7 @@ void KoToolBox::addButton(const KoToolButton &button)
}
sectionWidget->addButton(button.button, button.priority);
if (button.buttonGroupId < 0)
d->buttonGroup->addButton(button.button);
else
d->buttonGroup->addButton(button.button, button.buttonGroupId);
d->buttonGroup->addButton(button.button, button.buttonGroupId);
d->visibilityCodes.insert(button.button, button.visibilityCode);
}
......
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