basis for ensuring keybindings turn off when editing things
This commit is contained in:
parent
ab88791d80
commit
3d1d0f84ba
2 changed files with 23 additions and 15 deletions
|
@ -33,6 +33,7 @@ pub enum Message {
|
|||
ChangeTitle(String),
|
||||
ChangeVerseOrder(String),
|
||||
ChangeLyrics(text_editor::Action),
|
||||
Edit(bool),
|
||||
}
|
||||
|
||||
impl SongEditor {
|
||||
|
@ -84,6 +85,7 @@ impl SongEditor {
|
|||
Task::none()
|
||||
}
|
||||
Message::ChangeTitle(title) => {
|
||||
debug!(title);
|
||||
self.title = title;
|
||||
Task::none()
|
||||
}
|
||||
|
@ -95,6 +97,11 @@ impl SongEditor {
|
|||
self.lyrics.perform(action);
|
||||
Task::none()
|
||||
}
|
||||
Message::Edit(edit) => {
|
||||
debug!(edit);
|
||||
self.editing = edit;
|
||||
Task::none()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,6 +126,7 @@ impl SongEditor {
|
|||
let title_input = text_input("song", &self.title)
|
||||
.on_input(Message::ChangeTitle)
|
||||
.label("Song Title");
|
||||
|
||||
let verse_input = text_input(
|
||||
"Verse
|
||||
order",
|
||||
|
@ -147,4 +155,8 @@ order",
|
|||
]);
|
||||
column.into()
|
||||
}
|
||||
|
||||
pub fn editing(&self) -> bool {
|
||||
self.editing
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue