Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uis #23

Merged
merged 5 commits into from
Jun 28, 2016
Merged

uis #23

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions schnapps/core/control_dock_camera_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ ControlDock_CameraTab::ControlDock_CameraTab(SCHNApps* s) :
// connect SCHNApps signals
connect(schnapps_, SIGNAL(camera_added(Camera*)), this, SLOT(camera_added(Camera*)));
connect(schnapps_, SIGNAL(camera_removed(Camera*)), this, SLOT(camera_removed(Camera*)));

check_drawCamera->setDisabled(true);
check_drawCameraPath->setDisabled(true);
}

void ControlDock_CameraTab::add_camera_button_clicked()
Expand Down Expand Up @@ -83,6 +86,9 @@ void ControlDock_CameraTab::selected_camera_changed()
else
selected_camera_ = nullptr;

check_drawCamera->setDisabled(selected_camera_ == nullptr);
check_drawCameraPath->setDisabled(selected_camera_ == nullptr);

update_selected_camera_info();
}
}
Expand All @@ -100,13 +106,13 @@ void ControlDock_CameraTab::camera_projection_changed(QAbstractButton* b)

void ControlDock_CameraTab::camera_draw_clicked(bool b)
{
if (!updating_ui_)
if (!updating_ui_ && selected_camera_)
selected_camera_->set_draw(b);
}

void ControlDock_CameraTab::camera_draw_path_clicked(bool b)
{
if (!updating_ui_)
if (!updating_ui_&& selected_camera_)
selected_camera_->set_draw_path(b);
}

Expand Down Expand Up @@ -173,6 +179,9 @@ void ControlDock_CameraTab::selected_camera_draw_path_changed(bool b)

void ControlDock_CameraTab::update_selected_camera_info()
{
if (!selected_camera_)
return;

updating_ui_ = true;

if (selected_camera_->get_projection_type() == qoglviewer::Camera::PERSPECTIVE)
Expand Down
Loading