just hide the layer in courtroom.cpp
This commit is contained in:
parent
0475b2a045
commit
da3b872beb
@ -25,17 +25,6 @@ void AnimationLoader::load(const QString &fileName)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (fileName == QObject::tr("Invalid File"))
|
||||
{
|
||||
// Set the image to a null pixmap if it's invalid
|
||||
stopLoading();
|
||||
m_size = QSize(1, 1);
|
||||
m_frames.clear();
|
||||
m_frames.append(AnimationFrame(QPixmap(), 0));
|
||||
m_frame_count = 1;
|
||||
m_loop_count = 0;
|
||||
return;
|
||||
}
|
||||
stopLoading();
|
||||
m_file_name = fileName;
|
||||
QImageReader *reader = new QImageReader;
|
||||
|
@ -4526,7 +4526,14 @@ void Courtroom::set_scene(bool show_desk, const QString f_side)
|
||||
QPair<QString, QRect> desk_pair = ao_app->get_pos_path(f_side, true);
|
||||
|
||||
ui_vp_background->loadAndPlayAnimation(bg_pair.first);
|
||||
ui_vp_desk->loadAndPlayAnimation(desk_pair.first);
|
||||
if (file_exists(ao_app->get_image_suffix(ao_app->get_background_path(desk_pair.first))))
|
||||
{
|
||||
ui_vp_desk->loadAndPlayAnimation(desk_pair.first);
|
||||
}
|
||||
else
|
||||
{
|
||||
show_desk = false;
|
||||
}
|
||||
|
||||
double scale = double(ui_viewport->height()) / double(ui_vp_background->frameSize().height());
|
||||
QSize scaled_size = ui_vp_background->frameSize() * scale;
|
||||
|
Loading…
Reference in New Issue
Block a user