Fixed bug where deactivated PaneWidgets were still visible after state restoration
This commit is contained in:
@@ -24,9 +24,7 @@ namespace Bloom::Widgets
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PaneWidget::deactivate() {
|
void PaneWidget::deactivate() {
|
||||||
if (this->isVisible()) {
|
|
||||||
this->hide();
|
this->hide();
|
||||||
}
|
|
||||||
|
|
||||||
this->state.activated = false;
|
this->state.activated = false;
|
||||||
emit this->paneDeactivated();
|
emit this->paneDeactivated();
|
||||||
@@ -44,6 +42,11 @@ namespace Bloom::Widgets
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->state.attached = false;
|
this->state.attached = false;
|
||||||
|
|
||||||
|
if (this->state.activated) {
|
||||||
|
this->show();
|
||||||
|
}
|
||||||
|
|
||||||
emit this->paneDetached();
|
emit this->paneDetached();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,6 +54,10 @@ namespace Bloom::Widgets
|
|||||||
this->setWindowFlag(Qt::Window, false);
|
this->setWindowFlag(Qt::Window, false);
|
||||||
|
|
||||||
this->state.attached = true;
|
this->state.attached = true;
|
||||||
|
|
||||||
|
if (this->state.activated) {
|
||||||
|
this->show();
|
||||||
|
}
|
||||||
emit this->paneAttached();
|
emit this->paneAttached();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -188,12 +188,18 @@ namespace Bloom::Widgets
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Restore the state
|
// Restore the state
|
||||||
if (!this->state.attached) {
|
if (this->state.attached) {
|
||||||
|
this->attach();
|
||||||
|
|
||||||
|
} else {
|
||||||
this->detach();
|
this->detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->state.activated) {
|
if (this->state.activated) {
|
||||||
this->activate();
|
this->activate();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this->deactivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,14 +144,15 @@ namespace Bloom::Widgets
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Restore the state
|
// Restore the state
|
||||||
if (!this->state.attached) {
|
|
||||||
// The register pane cannot be detached.
|
|
||||||
this->state.attached = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this->state.activated) {
|
if (this->state.activated) {
|
||||||
this->activate();
|
this->activate();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this->deactivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The register pane cannot be detached.
|
||||||
|
this->attach();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TargetRegistersPaneWidget::filterRegisters(const QString& keyword) {
|
void TargetRegistersPaneWidget::filterRegisters(const QString& keyword) {
|
||||||
|
|||||||
Reference in New Issue
Block a user