Commit 51bfaa4c authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed handling of selection dragging in resource editor

When dragging the mouse to select an item that is not currently visible,
the ResourceView was not making the selected item visible. This was due
to an unnecessary reimplementation the protected currentChanged slot.

Reviewed-by: owolff
parent 9ab420d1
......@@ -61,7 +61,8 @@ QrcEditor::QrcEditor(QWidget *parent)
connect(m_treeview, SIGNAL(addPrefixTriggered()), this, SLOT(onAddPrefix()));
connect(m_treeview, SIGNAL(addFilesTriggered(QString)), this, SLOT(onAddFiles()));
connect(m_treeview, SIGNAL(removeItem()), this, SLOT(onRemove()));
connect(m_treeview, SIGNAL(currentIndexChanged()), this, SLOT(updateCurrent()));
connect(m_treeview->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
this, SLOT(updateCurrent()));
connect(m_treeview, SIGNAL(dirtyChanged(bool)), this, SIGNAL(dirtyChanged(bool)));
......@@ -203,13 +203,6 @@ ResourceView::~ResourceView()
void ResourceView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
emit currentIndexChanged();
bool ResourceView::isDirty() const
return m_qrcModel->dirty();
......@@ -139,14 +139,10 @@ protected:
void removeItem();
void dirtyChanged(bool b);
void currentIndexChanged();
void addFilesTriggered(const QString &prefix);
void addPrefixTriggered();
protected slots:
void currentChanged(const QModelIndex &current, const QModelIndex &previous);
private slots:
void onEditAlias();
void onEditPrefix();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment