Skip to content

Commit

Permalink
Merge pull request #23 from etienneschmitt/develop-schmitte
Browse files Browse the repository at this point in the history
uis
  • Loading branch information
pierrekraemer authored Jun 28, 2016
2 parents 3c0b89d + feea180 commit f2648bd
Show file tree
Hide file tree
Showing 13 changed files with 1,648 additions and 1,160 deletions.
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

0 comments on commit f2648bd

Please sign in to comment.