Skip to content

Commit

Permalink
Github Issue #120: Now the double mouse click renaming of files in th…
Browse files Browse the repository at this point in the history
…e Navigation QTreeview updates the recently opened documents list
  • Loading branch information
AngryFender committed Jan 13, 2024
1 parent ab9d9ac commit 32d467f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions navigationview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ void NavigationView::rowsInserted(const QModelIndex &parent, int start, int end)
folderChangedHandler();
}

void NavigationView::mouseDoubleClickEvent(QMouseEvent *event)
{
renameFile();
}

void NavigationView::ContextMenuHandler(QPoint pos)
{
QMenu menu(this);
Expand Down
2 changes: 1 addition & 1 deletion navigationview.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class NavigationView : public QTreeView

protected:
void rowsInserted(const QModelIndex &parent, int start, int end) override;

void mouseDoubleClickEvent(QMouseEvent *event) override;
public slots:
void ContextMenuHandler(QPoint pos);
void addFile();
Expand Down

0 comments on commit 32d467f

Please sign in to comment.