Bugfix: Setting mouse controls to OnShape resets to KittyCAD

Fixes #4639
This commit is contained in:
Pierre Jacquier
2024-12-06 12:57:56 -05:00
parent 441d957228
commit c95878d617
2 changed files with 6 additions and 6 deletions

View File

@ -32,11 +32,11 @@ export function mouseControlsToCameraSystem(
mouseControl: MouseControlType | undefined
): CameraSystem | undefined {
switch (mouseControl) {
case 'kitty_cad':
case 'kittycad':
return 'KittyCAD'
case 'on_shape':
case 'onshape':
return 'OnShape'
case 'trackpad_friendly':
case 'trackpadfriendly':
return 'Trackpad Friendly'
case 'solidworks':
return 'Solidworks'
@ -44,7 +44,7 @@ export function mouseControlsToCameraSystem(
return 'NX'
case 'creo':
return 'Creo'
case 'auto_cad':
case 'autocad':
return 'AutoCAD'
default:
return undefined

View File

@ -376,8 +376,8 @@ impl From<UnitLength> for kittycad_modeling_cmds::units::UnitLength {
/// The types of controls for how to navigate the 3D view.
#[derive(Debug, Default, Eq, PartialEq, Clone, Deserialize, Serialize, JsonSchema, ts_rs::TS, Display, FromStr)]
#[ts(export)]
#[serde(rename_all = "snake_case")]
#[display(style = "snake_case")]
#[serde(rename_all = "lowercase")]
#[display(style = "lowercase")]
pub enum MouseControlType {
#[default]
#[display("kittycad")]