fix: pivot use disabled method

This commit is contained in:
mtvare6 2025-07-07 06:30:48 +05:30
parent 1ec29743c3
commit 9a05bbe46d

View file

@ -15,6 +15,7 @@ use std::fmt;
pub fn pin_pivot_widget(inactive: bool, enabled: bool, source: Source) -> WidgetHolder {
IconButton::new(if inactive { "PinInactive" } else { "PinActive" }, 24)
.tooltip(if inactive { "Pin Transform Pivot" } else { "Unpin Transform Pivot" })
.disabled(!enabled)
.on_update(move |_| match source {
Source::Select if enabled => SelectToolMessage::SelectOptions(SelectOptionsUpdate::TogglePivotPinned()).into(),
Source::Path if enabled => PathToolMessage::UpdateOptions(PathOptionsUpdate::TogglePivotPinned()).into(),