@@ -972,7 +972,7 @@ pub enum Message {
972
972
LocationMenuAction ( LocationMenuAction ) ,
973
973
Drag ( Option < Rectangle > ) ,
974
974
EditLocation ( Option < Location > ) ,
975
- EditLocationToggle ,
975
+ EditLocationEnable ,
976
976
OpenInNewTab ( PathBuf ) ,
977
977
EmptyTrash ,
978
978
Gallery ( bool ) ,
@@ -2016,6 +2016,7 @@ impl Tab {
2016
2016
Message :: Click ( click_i_opt) => {
2017
2017
self . selected_clicked = false ;
2018
2018
self . context_menu = None ;
2019
+ self . edit_location = None ;
2019
2020
self . location_context_menu_index = None ;
2020
2021
if click_i_opt. is_none ( ) {
2021
2022
self . clicked = click_i_opt;
@@ -2150,6 +2151,7 @@ impl Tab {
2150
2151
commands. push ( Command :: Action ( action) ) ;
2151
2152
}
2152
2153
Message :: ContextMenu ( point_opt) => {
2154
+ self . edit_location = None ;
2153
2155
if point_opt. is_none ( ) || !mod_shift {
2154
2156
self . context_menu = point_opt;
2155
2157
//TODO: hack for clearing selecting when right clicking empty space
@@ -2234,12 +2236,11 @@ impl Tab {
2234
2236
}
2235
2237
self . edit_location = edit_location;
2236
2238
}
2237
- Message :: EditLocationToggle => {
2238
- if self . edit_location . is_none ( ) {
2239
- self . edit_location = Some ( self . location . clone ( ) ) ;
2240
- } else {
2241
- self . edit_location = None ;
2242
- }
2239
+ Message :: EditLocationEnable => {
2240
+ commands. push ( Command :: Iced ( widget:: text_input:: focus (
2241
+ self . edit_location_id . clone ( ) ,
2242
+ ) ) ) ;
2243
+ self . edit_location = Some ( self . location . clone ( ) ) ;
2243
2244
}
2244
2245
Message :: OpenInNewTab ( path) => {
2245
2246
commands. push ( Command :: OpenInNewTab ( path) ) ;
0 commit comments