mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-11 09:40:26 +00:00
Fix view re-creation due to visibility change.
This commit is contained in:
parent
53b072f8f6
commit
825adfcf2f
@ -128,7 +128,6 @@ bool LyricsLayout::KeyPress(const std::string& kn) {
|
||||
void LyricsLayout::OnVisibilityChanged(bool visible) {
|
||||
LayoutBase::OnVisibilityChanged(visible);
|
||||
if (visible) {
|
||||
this->SetState(this->state);
|
||||
this->LoadLyricsForCurrentTrack();
|
||||
this->FocusFirst();
|
||||
}
|
||||
|
@ -327,7 +327,9 @@ void Window::MoveAndResize(int x, int y, int width, int height) {
|
||||
this->lastAbsoluteY = absY;
|
||||
this->width = width;
|
||||
this->height = height;
|
||||
this->RecreateForUpdatedDimensions();
|
||||
if (this->isVisibleInParent) {
|
||||
this->RecreateForUpdatedDimensions();
|
||||
}
|
||||
}
|
||||
else {
|
||||
this->DestroyIfBadBounds();
|
||||
@ -616,7 +618,7 @@ void Window::Show() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
this->Create();
|
||||
this->RecreateForUpdatedDimensions();
|
||||
this->isVisibleInParent = true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user