@@ -777,10 +777,12 @@ impl GardenApp<'_> {
777777 ui. label ( "Click to copy path. Right-click to copy the tree name." ) ;
778778 } ) ;
779779 if copy_button. clicked ( ) {
780- ui. output_mut ( |output| output. copied_text = path. to_string ( ) ) ;
780+ let copy_text = egui:: OutputCommand :: CopyText ( path. to_string ( ) ) ;
781+ ui. output_mut ( |output| output. commands . push ( copy_text) ) ;
781782 }
782783 if copy_button. secondary_clicked ( ) {
783- ui. output_mut ( |output| output. copied_text = tree_ctx. tree . to_string ( ) ) ;
784+ let copy_text = egui:: OutputCommand :: CopyText ( tree_ctx. tree . to_string ( ) ) ;
785+ ui. output_mut ( |output| output. commands . push ( copy_text) ) ;
784786 }
785787 ui. monospace ( & tree_ctx. tree ) ;
786788 } ,
@@ -832,7 +834,8 @@ impl GardenApp<'_> {
832834 if ui. monospace ( path) . on_hover_ui ( |ui| {
833835 ui. label ( "Right-click to copy path." ) ;
834836 } ) . secondary_clicked ( ) {
835- ui. output_mut ( |output| output. copied_text = path. to_string ( ) ) ;
837+ let copy_text = eframe:: egui:: OutputCommand :: CopyText ( path. to_string ( ) ) ;
838+ ui. output_mut ( |output| output. commands . push ( copy_text) ) ;
836839 }
837840 } else if ui. label (
838841 egui:: RichText :: new ( path)
@@ -841,7 +844,8 @@ impl GardenApp<'_> {
841844 ) . on_hover_ui ( |ui| {
842845 ui. label ( "Right-click to copy path." ) ;
843846 } ) . secondary_clicked ( ) {
844- ui. output_mut ( |output| output. copied_text = path. to_string ( ) ) ;
847+ let copy_text = eframe:: egui:: OutputCommand :: CopyText ( path. to_string ( ) ) ;
848+ ui. output_mut ( |output| output. commands . push ( copy_text) ) ;
845849 }
846850 } ,
847851 ) ;
0 commit comments