Permalink
Browse files

notification for keyframe/flight folder does not exist

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 9a32cdcc577adb854fb008310a25184abf88ddec
Showing with 30 additions and 10 deletions.
  1. +15 −5 mandelbulber2/src/animation_flight.cpp
  2. +15 −5 mandelbulber2/src/animation_keyframes.cpp
@@ -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.

Show comment
Hide comment
@zebastian

zebastian Jul 3, 2016

Collaborator

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

@zebastian

zebastian Jul 3, 2016

Collaborator

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

This comment has been minimized.

Show comment
Hide comment
@buddhi1980

buddhi1980 Jul 3, 2016

Owner

Is this something which has to be fixed immediately?

@buddhi1980

buddhi1980 Jul 3, 2016

Owner

Is this something which has to be fixed immediately?

This comment has been minimized.

Show comment
Hide comment
@mclarekin

mclarekin Jul 3, 2016

Collaborator
@mclarekin

mclarekin via email Jul 3, 2016

Collaborator

This comment has been minimized.

Show comment
Hide comment
@buddhi1980

buddhi1980 Jul 3, 2016

Owner
@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
@@ -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

0 comments on commit 9a32cdc

Please sign in to comment.