mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Make sure when we change main layouts we bring them to the top so all
views appear properly.
This commit is contained in:
parent
be9284e4ef
commit
ddacf4dc69
@ -113,7 +113,7 @@ void LibraryLayout::ChangeMainLayout(std::shared_ptr<cursespp::LayoutBase> newLa
|
||||
this->visibleLayout->SetFocusMode(ILayout::FocusModeTerminating);
|
||||
|
||||
if (this->IsVisible()) {
|
||||
this->BringToTop();
|
||||
this->visibleLayout->BringToTop();
|
||||
}
|
||||
|
||||
this->OnLayoutChanged();
|
||||
|
@ -70,6 +70,7 @@ void MainLayout::OnLayout() {
|
||||
if (this->layout) {
|
||||
this->layout->MoveAndResize(0, 0, cx, cy - 1);
|
||||
this->layout->Show();
|
||||
this->layout->BringToTop();
|
||||
|
||||
if (this->shortcutsFocused) {
|
||||
this->layout->SetFocus(IWindowPtr());
|
||||
|
@ -395,12 +395,21 @@ void Window::Recreate() {
|
||||
}
|
||||
|
||||
void Window::OnParentVisibilityChanged(bool visible) {
|
||||
if (!visible && this->isVisible && this->framePanel) {
|
||||
this->Destroy();
|
||||
if (!visible && this->isVisible) {
|
||||
if (this->framePanel) {
|
||||
this->Destroy();
|
||||
}
|
||||
|
||||
this->OnVisibilityChanged(false);
|
||||
}
|
||||
else if (visible && this->isVisible && !this->framePanel) {
|
||||
this->Recreate();
|
||||
else if (visible && this->isVisible) {
|
||||
if (this->framePanel) {
|
||||
this->Redraw();
|
||||
}
|
||||
else {
|
||||
this->Recreate();
|
||||
}
|
||||
|
||||
this->OnVisibilityChanged(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user