Changeset View
Changeset View
Standalone View
Standalone View
part/archiveview.cpp
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Line(s) | 149 | } else { | |||
---|---|---|---|---|---|
150 | QTreeView::keyPressEvent(event); | 150 | QTreeView::keyPressEvent(event); | ||
151 | } | 151 | } | ||
152 | } | 152 | } | ||
153 | 153 | | |||
154 | void ArchiveView::renameSelectedEntry() | 154 | void ArchiveView::renameSelectedEntry() | ||
155 | { | 155 | { | ||
156 | QModelIndex currentIndex = selectionModel()->currentIndex(); | 156 | QModelIndex currentIndex = selectionModel()->currentIndex(); | ||
157 | currentIndex = (currentIndex.parent().isValid()) | 157 | currentIndex = (currentIndex.parent().isValid()) | ||
158 | ? currentIndex.parent().child(currentIndex.row(), 0) | 158 | ? currentIndex.parent().model()->index(currentIndex.row(), 0, currentIndex.parent()) | ||
159 | : model()->index(currentIndex.row(), 0); | 159 | : model()->index(currentIndex.row(), 0); | ||
160 | openEntryEditor(currentIndex); | 160 | openEntryEditor(currentIndex); | ||
161 | } | 161 | } | ||
162 | 162 | | |||
163 | void ArchiveView::openEntryEditor(const QModelIndex &index) | 163 | void ArchiveView::openEntryEditor(const QModelIndex &index) | ||
164 | { | 164 | { | ||
165 | m_editorIndex = index; | 165 | m_editorIndex = index; | ||
166 | openPersistentEditor(index); | 166 | openPersistentEditor(index); | ||
Show All 13 Lines |