mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Use current index changed slot instead of selection changed signal in group view to update the entry view.
This commit is contained in:
parent
60e65bec35
commit
8cd5b1f582
@ -32,9 +32,6 @@ GroupView::GroupView(Database* db, QWidget* parent)
|
||||
setHeaderHidden(true);
|
||||
setUniformRowHeights(true);
|
||||
|
||||
connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||
SLOT(emitGroupChanged()));
|
||||
|
||||
recInitExpanded(db->rootGroup());
|
||||
connect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(expandedChanged(QModelIndex)));
|
||||
connect(this, SIGNAL(collapsed(QModelIndex)), this, SLOT(expandedChanged(QModelIndex)));
|
||||
@ -116,6 +113,13 @@ void GroupView::syncExpandedState(const QModelIndex& parent, int start, int end)
|
||||
}
|
||||
}
|
||||
|
||||
void GroupView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
||||
{
|
||||
Q_UNUSED(current);
|
||||
Q_UNUSED(previous);
|
||||
emitGroupChanged();
|
||||
}
|
||||
|
||||
void GroupView::setCurrentGroup(Group* group)
|
||||
{
|
||||
setCurrentIndex(m_model->index(group));
|
||||
|
@ -43,6 +43,7 @@ private Q_SLOTS:
|
||||
void emitGroupChanged(const QModelIndex& index);
|
||||
void emitGroupChanged();
|
||||
void syncExpandedState(const QModelIndex& parent, int start, int end);
|
||||
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
|
||||
protected:
|
||||
void dragMoveEvent(QDragMoveEvent* event);
|
||||
|
Loading…
Reference in New Issue
Block a user