mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
parent
e85854aa24
commit
cb6b0dde27
@ -70,7 +70,16 @@ void EditWidget::addPage(const QString& labelText, const QIcon& icon, QWidget* w
|
||||
|
||||
void EditWidget::setPageHidden(QWidget* widget, bool hidden)
|
||||
{
|
||||
int index = m_ui->stackedWidget->indexOf(widget);
|
||||
int index = -1;
|
||||
|
||||
for (int i = 0; i < m_ui->stackedWidget->count(); i++) {
|
||||
auto* scrollArea = qobject_cast<QScrollArea*>(m_ui->stackedWidget->widget(i));
|
||||
if (scrollArea != nullptr && scrollArea->widget() == widget) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (index != -1) {
|
||||
m_ui->categoryList->setCategoryHidden(index, hidden);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user