Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions crates/viewer/re_viewer/src/app_state.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ahash::HashMap;
use egui::{NumExt as _, Ui, text_selection::LabelSelectionState};
use egui::{NumExt as _, Ui, text_edit::TextEditState, text_selection::LabelSelectionState};

use re_chunk::TimelineName;
use re_chunk_store::LatestAtQuery;
Expand Down Expand Up @@ -683,8 +683,12 @@ impl AppState {
self.selection_state.clear_selection();
}

// If there's no label selected, and the user triggers a copy command, copy a description of the current selection.
if !LabelSelectionState::load(ui.ctx()).has_selection()
// If there's no text edit or label selected, and the user triggers a copy command, copy a description of the current selection.
if ui
.memory(|mem| mem.focused())
.and_then(|id| TextEditState::load(ui.ctx(), id))
.is_none()
&& !LabelSelectionState::load(ui.ctx()).has_selection()
&& ui.input(|input| input.events.iter().any(|e| e == &egui::Event::Copy))
{
self.selection_state
Expand Down