mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05: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