Skip to content

Commit

Permalink
disable mask edit mode on recompute events
Browse files Browse the repository at this point in the history
  • Loading branch information
jice-nospam committed Oct 6, 2022
1 parent 5c2eaf6 commit 57f6540
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ impl MyApp {
.show(ui, |ui| match self.panel_2d.render(ui) {
Some(Panel2dAction::ResizePreview(new_size)) => {
self.resize(new_size);
self.mask_step = None;
self.gen_panel.mask_selected = false;
}
Some(Panel2dAction::MaskUpdated) => {
self.last_mask_updated = ui.input().time;
Expand Down
5 changes: 4 additions & 1 deletion src/panel_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ impl PanelGenerator {
} => (),
}
if ui.button("Refresh").clicked() {
action = Some(GeneratorAction::Regen(false, self.selected_step))
action = Some(GeneratorAction::Regen(false, self.selected_step));
self.mask_selected = false;
}
action
}
Expand Down Expand Up @@ -369,6 +370,7 @@ impl PanelGenerator {
};
}
action = Some(GeneratorAction::Regen(true, i));
self.mask_selected = false;
}
if ui.input().pointer.any_released() {
if let Some(i) = to_move {
Expand All @@ -381,6 +383,7 @@ impl PanelGenerator {
};
self.steps.insert(dest, step);
action = Some(GeneratorAction::Regen(false, i));
self.mask_selected = false;
}
}
}
Expand Down

0 comments on commit 57f6540

Please sign in to comment.