mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Disable remaining toolbar items when one of them is toggable and pressed
This commit is contained in:
parent
baece78390
commit
40a1f31e84
1 changed files with 7 additions and 1 deletions
|
@ -1396,9 +1396,15 @@ bool GLToolbar::update_items_enabled_state()
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
for (GLToolbarItem* item : m_items)
|
for (unsigned int i = 0; i < (unsigned int)m_items.size(); ++i)
|
||||||
{
|
{
|
||||||
|
GLToolbarItem* item = m_items[i];
|
||||||
ret |= item->update_enabled_state();
|
ret |= item->update_enabled_state();
|
||||||
|
if (item->is_enabled() && (m_pressed_toggable_id != -1) && (m_pressed_toggable_id != i))
|
||||||
|
{
|
||||||
|
ret = true;
|
||||||
|
item->set_state(GLToolbarItem::Disabled);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue