Skip to content

Commit

Permalink
clean up camera config
Browse files Browse the repository at this point in the history
  • Loading branch information
PingHsunTsai committed Jul 10, 2024
1 parent adb280c commit fb1c9c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/compas_viewer/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def change_view(viewer: "Viewer", mode: Literal["Perspective", "Top", "Front", "


def camera_settings(viewer: "Viewer"):
items = viewer.config.cameradialog.items
items = viewer.config.camera.dialog_settings
CameraSettingsDialog(items=items).exec()


Expand Down
7 changes: 1 addition & 6 deletions src/compas_viewer/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,7 @@ class CameraConfig(ConfigBase):
zoomdelta: float = 0.05
rotationdelta: float = 0.01
pandelta: float = 0.05


@dataclass
class CameraDialogConfig(ConfigBase):
items: list[dict] = field(
dialog_settings: list[dict] = field(
default_factory=lambda: [
{
"title": "Camera_Target",
Expand Down Expand Up @@ -410,7 +406,6 @@ class Config(ConfigBase):
window: WindowConfig = field(default_factory=WindowConfig)
renderer: RendererConfig = field(default_factory=RendererConfig)
camera: CameraConfig = field(default_factory=CameraConfig)
cameradialog: CameraDialogConfig = field(default_factory=CameraDialogConfig)
commands: list[Command] = field(
default_factory=lambda: [
camera_settings_cmd,
Expand Down

0 comments on commit fb1c9c9

Please sign in to comment.