mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
fixed crash using animated images in plugins
This commit is contained in:
@@ -39,6 +39,7 @@ void cDisplayPluginView::Deactivate(bool hide) {
|
||||
cDevice::PrimaryDevice()->ScaleVideo(cRect::Null);
|
||||
}
|
||||
HidePixmaps();
|
||||
HideAnimations();
|
||||
for (map< int, cViewGrid* >::iterator it = viewGrids.begin(); it != viewGrids.end(); it++) {
|
||||
cViewGrid *viewGrid = it->second;
|
||||
viewGrid->Hide();
|
||||
@@ -52,6 +53,7 @@ void cDisplayPluginView::Activate(void) {
|
||||
}
|
||||
if (hidden) {
|
||||
ShowPixmaps();
|
||||
ShowAnimations();
|
||||
for (map< int, cViewGrid* >::iterator it = viewGrids.begin(); it != viewGrids.end(); it++) {
|
||||
cViewGrid *viewGrid = it->second;
|
||||
viewGrid->Show();
|
||||
|
||||
14
views/view.c
14
views/view.c
@@ -269,6 +269,20 @@ void cView::ClearAnimations(int cat) {
|
||||
animations.erase(cat);
|
||||
}
|
||||
|
||||
void cView::HideAnimations(void) {
|
||||
for (multimap<int,cAnimation*>::iterator it = animations.begin(); it!=animations.end(); ++it) {
|
||||
cAnimation *anim = it->second;
|
||||
anim->HidePixmaps();
|
||||
}
|
||||
}
|
||||
|
||||
void cView::ShowAnimations(void) {
|
||||
for (multimap<int,cAnimation*>::iterator it = animations.begin(); it!=animations.end(); ++it) {
|
||||
cAnimation *anim = it->second;
|
||||
anim->ShowPixmaps();
|
||||
}
|
||||
}
|
||||
|
||||
void cView::ActivateScrolling(void) {
|
||||
if (veScroll == veUndefined)
|
||||
return;
|
||||
|
||||
@@ -78,6 +78,8 @@ public:
|
||||
void DrawDebugGrid(void);
|
||||
virtual ~cView();
|
||||
virtual void Stop(void);
|
||||
void HideAnimations(void);
|
||||
void ShowAnimations(void);
|
||||
};
|
||||
|
||||
class cViewElement : public cView {
|
||||
|
||||
@@ -71,6 +71,7 @@ void cViewGrid::Hide(void) {
|
||||
for (map < long, cGrid* >::iterator it = grids.begin(); it != grids.end(); it++) {
|
||||
cGrid *grid = it->second;
|
||||
grid->HidePixmaps();
|
||||
grid->HideAnimations();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +79,7 @@ void cViewGrid::Show(void) {
|
||||
for (map < long, cGrid* >::iterator it = grids.begin(); it != grids.end(); it++) {
|
||||
cGrid *grid = it->second;
|
||||
grid->ShowPixmaps();
|
||||
grid->ShowAnimations();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user