Skip to content

Commit

Permalink
Update pane.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
fairybow committed Dec 31, 2022
1 parent cc25f28 commit a5acbf4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fernanda/src/pane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void Pane::receiveEditsList(QVector<QString> editedFiles)

void Pane::mouseDoubleClickEvent(QMouseEvent* event)
{
if (currentIndex().model()->hasChildren())
if (currentIndex().isValid() && currentIndex().model()->hasChildren())
QTreeView::mouseDoubleClickEvent(event);
}

Expand Down Expand Up @@ -131,7 +131,7 @@ void Pane::contextMenuEvent(QContextMenuEvent* event)
if (!project) return;
auto& position = event->pos();
auto index = indexAt(position);
auto menu = new QMenu(this);
auto* menu = new QMenu(this);
auto* rename_item = new QAction(tr("&Rename"), this);
auto* cut_item = new QAction(tr("&Cut"), this);
auto* new_folder = new QAction(tr("&New folder"), this);
Expand Down

0 comments on commit a5acbf4

Please sign in to comment.