Skip to content

Commit

Permalink
notification for keyframe/flight folder does not exist
Browse files Browse the repository at this point in the history
when the user presses the button to render keyframe/flight an error
notification will be shown, if the folder to store does not exist.
This fixes issue #93
  • Loading branch information
zebastian committed May 30, 2016
1 parent 710bffe commit 9a32cdc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
20 changes: 15 additions & 5 deletions mandelbulber2/src/animation_flight.cpp
Expand Up @@ -173,18 +173,28 @@ void cFlightAnimation::slotContinueRecording()

void cFlightAnimation::slotRenderFlight()
{
//get latest values of all parameters
mainInterface->SynchronizeInterface(params, fractalParams, qInterface::read);

This comment has been minimized.

Copy link
@zebastian

zebastian Jul 3, 2016

Author Collaborator

introduced bug! this breaks flight rendering on the CLI. Same for keyframe animation.

This comment has been minimized.

Copy link
@buddhi1980

buddhi1980 Jul 3, 2016

Owner

Is this something which has to be fixed immediately?

This comment has been minimized.

Copy link
@mclarekin

mclarekin via email Jul 3, 2016

Collaborator

This comment has been minimized.

Copy link
@buddhi1980

buddhi1980 via email Jul 3, 2016

Owner

if (frames)
{
if (frames->GetNumberOfFrames() > 0)
{
RenderFlight(&gMainInterface->stopRequest);
}
else
if (frames->GetNumberOfFrames() == 0)
{
emit showErrorMessage(QObject::tr("No frames to render"),
cErrorMessage::errorMessage,
ui->centralwidget);
}
else if (!QDir(params->Get<QString>("anim_flight_dir")).exists())
{
emit showErrorMessage(
QObject::tr("The folder %1 does not exist. Please specify a valid location.")
.arg(params->Get<QString>("anim_flight_dir")),
cErrorMessage::errorMessage, ui->centralwidget);
}
else
{
RenderFlight(&gMainInterface->stopRequest);
}

}
else
Expand Down
20 changes: 15 additions & 5 deletions mandelbulber2/src/animation_keyframes.cpp
Expand Up @@ -250,18 +250,28 @@ void cKeyframeAnimation::slotDeleteKeyframe()

void cKeyframeAnimation::slotRenderKeyframes()
{
//get latest values of all parameters
mainInterface->SynchronizeInterface(params, fractalParams, qInterface::read);

if (keyframes)
{
if (keyframes->GetNumberOfFrames() > 0)
{
RenderKeyframes(&gMainInterface->stopRequest);
}
else
if (keyframes->GetNumberOfFrames() == 0)
{
emit showErrorMessage(QObject::tr("No frames to render"),
cErrorMessage::errorMessage,
ui->centralwidget);
}
else if (!QDir(params->Get<QString>("anim_keyframe_dir")).exists())
{
emit showErrorMessage(
QObject::tr("The folder %1 does not exist. Please specify a valid location.")
.arg(params->Get<QString>("anim_keyframe_dir")),
cErrorMessage::errorMessage, ui->centralwidget);
}
else
{
RenderKeyframes(&gMainInterface->stopRequest);
}

}
else
Expand Down

0 comments on commit 9a32cdc

Please sign in to comment.