feat(props): select whole value when a property field is clicked
Clicking an editable property value field now selects its entire value instead of only placing the caret, so typing immediately replaces it. The click is observed through a global left-press subscription (PropPointerPressed); a focus sweep reports which widget took focus and PropSyncActive maps it back to the active property row, then issues a select-all operation only when focus landed on a different field. The active row stays highlighted while its text input holds keyboard focus and clears when focus moves elsewhere.
This commit is contained in:
parent
dceb9626ae
commit
9f68034a60
6 changed files with 336 additions and 18 deletions
|
|
@ -2120,6 +2120,7 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
|||
|
||||
pub(super) fn on_prop_geom_commit(&mut self, field: &'static str) -> Task<Message> {
|
||||
let i = self.active_tab;
|
||||
self.tabs[i].properties.active_field = None;
|
||||
let handles = self.property_target_handles(i);
|
||||
if !handles.is_empty() {
|
||||
if let Some(raw_val) = self.tabs[i].properties.edit_buf.remove(field) {
|
||||
|
|
@ -2348,6 +2349,7 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
|||
/// it is not run through the expression evaluator like numeric fields).
|
||||
pub(super) fn on_prop_attr_commit(&mut self, tag: String) -> Task<Message> {
|
||||
let i = self.active_tab;
|
||||
self.tabs[i].properties.active_field = None;
|
||||
let key = crate::ui::properties::attr_edit_key(&tag);
|
||||
let handles = self.property_target_handles(i);
|
||||
if handles.is_empty() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue