mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed crash using animated images in plugins
This commit is contained in:
parent
a0a6e21d5a
commit
bc07550708
2
HISTORY
2
HISTORY
@ -375,3 +375,5 @@ Version 0.5.3
|
||||
|
||||
- added SVG Template parsing
|
||||
- fixed memory leak when creating fonts
|
||||
- fixed crash using animated images in plugins
|
||||
|
||||
|
@ -78,6 +78,9 @@ skindesignerapi::cViewGrid::cViewGrid(skindesignerapi::ISkinDisplayPlugin *view,
|
||||
}
|
||||
|
||||
skindesignerapi::cViewGrid::~cViewGrid() {
|
||||
if (!view)
|
||||
return;
|
||||
view->ClearGrids(viewGridID);
|
||||
}
|
||||
|
||||
void skindesignerapi::cViewGrid::SetGrid(long gridID, double x, double y, double width, double height) {
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user