Add ModifiersChanged message on Tab and keep value
The message is forwarded from app/dialog Message, and used to keep the value of the status of modifiers in Tab.
This commit is contained in:
parent
d8a198e836
commit
e220268954
3 changed files with 14 additions and 0 deletions
|
|
@ -2629,6 +2629,11 @@ impl Application for App {
|
||||||
},
|
},
|
||||||
Message::ModifiersChanged(modifiers) => {
|
Message::ModifiersChanged(modifiers) => {
|
||||||
self.modifiers = modifiers;
|
self.modifiers = modifiers;
|
||||||
|
let entity = self.tab_model.active();
|
||||||
|
return self.update(Message::TabMessage(
|
||||||
|
Some(entity),
|
||||||
|
tab::Message::ModifiersChanged(modifiers),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
Message::MounterItems(mounter_key, mounter_items) => {
|
Message::MounterItems(mounter_key, mounter_items) => {
|
||||||
// Check for unmounted folders
|
// Check for unmounted folders
|
||||||
|
|
|
||||||
|
|
@ -1292,6 +1292,9 @@ impl Application for App {
|
||||||
}
|
}
|
||||||
Message::ModifiersChanged(modifiers) => {
|
Message::ModifiersChanged(modifiers) => {
|
||||||
self.modifiers = modifiers;
|
self.modifiers = modifiers;
|
||||||
|
return self.update(Message::TabMessage(tab::Message::ModifiersChanged(
|
||||||
|
modifiers,
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
Message::MounterItems(mounter_key, mounter_items) => {
|
Message::MounterItems(mounter_key, mounter_items) => {
|
||||||
// Check for unmounted folders
|
// Check for unmounted folders
|
||||||
|
|
|
||||||
|
|
@ -1257,6 +1257,7 @@ pub enum Message {
|
||||||
ItemUp,
|
ItemUp,
|
||||||
Location(Location),
|
Location(Location),
|
||||||
LocationUp,
|
LocationUp,
|
||||||
|
ModifiersChanged(Modifiers),
|
||||||
Open(Option<PathBuf>),
|
Open(Option<PathBuf>),
|
||||||
RightClick(Option<usize>),
|
RightClick(Option<usize>),
|
||||||
MiddleClick(usize),
|
MiddleClick(usize),
|
||||||
|
|
@ -1898,6 +1899,7 @@ pub struct Tab {
|
||||||
select_range: Option<(usize, usize)>,
|
select_range: Option<(usize, usize)>,
|
||||||
clicked: Option<usize>,
|
clicked: Option<usize>,
|
||||||
selected_clicked: bool,
|
selected_clicked: bool,
|
||||||
|
modifiers: Modifiers,
|
||||||
last_right_click: Option<usize>,
|
last_right_click: Option<usize>,
|
||||||
search_context: Option<SearchContext>,
|
search_context: Option<SearchContext>,
|
||||||
global_cursor_position: Option<Point>,
|
global_cursor_position: Option<Point>,
|
||||||
|
|
@ -1994,6 +1996,7 @@ impl Tab {
|
||||||
clicked: None,
|
clicked: None,
|
||||||
dnd_hovered: None,
|
dnd_hovered: None,
|
||||||
selected_clicked: false,
|
selected_clicked: false,
|
||||||
|
modifiers: Modifiers::default(),
|
||||||
last_right_click: None,
|
last_right_click: None,
|
||||||
search_context: None,
|
search_context: None,
|
||||||
global_cursor_position: None,
|
global_cursor_position: None,
|
||||||
|
|
@ -3034,6 +3037,9 @@ impl Tab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Message::ModifiersChanged(modifiers) => {
|
||||||
|
self.modifiers = modifiers;
|
||||||
|
}
|
||||||
Message::Open(path_opt) => {
|
Message::Open(path_opt) => {
|
||||||
match path_opt {
|
match path_opt {
|
||||||
Some(path) => {
|
Some(path) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue