mirror of
https://github.com/storytold/deckcraft.git
synced 2026-11-02 06:57:04 -06:00
Merge the startup, clipboard, animation-preview and UI PRs integrated on land-r5 (#644 #652 #655 #702 #571 #539 #674 #648 #697 #479 #369 #368)
# Conflicts: # crates/ui-egui/src/canvas.rs # crates/ui-egui/src/ribbon.rs
This commit is contained in:
@@ -369,7 +369,7 @@ impl Session {
|
||||
}
|
||||
}
|
||||
|
||||
fn begin(&mut self, label: &str) {
|
||||
pub(crate) fn begin(&mut self, label: &str) {
|
||||
if let Some(st) = self.active_mut()
|
||||
&& st.interaction.is_none()
|
||||
{
|
||||
@@ -386,6 +386,14 @@ impl Session {
|
||||
}
|
||||
}
|
||||
|
||||
/// End the interaction only when it is the one `label` started. A twist must not commit a drag.
|
||||
pub(crate) fn commit_named(&mut self, label: &str) {
|
||||
let ours = self.active().and_then(|st| st.interaction.as_ref()).is_some_and(|i| i.label == label);
|
||||
if ours {
|
||||
self.commit();
|
||||
}
|
||||
}
|
||||
|
||||
fn down(&mut self, p: Point, mods: Mods, tol: f64) -> Result<Value> {
|
||||
if let Some(Drag::Freeform { mode, mut points, .. }) = self.tool.drag.clone() {
|
||||
// Next click of a freeform: close on the start point, else add a vertex.
|
||||
|
||||
Reference in New Issue
Block a user