forked from qt-creator/qt-creator
Don't select file extension when renaming resource files
Resource files would not get the handling like files do, because they are folder nodes. For folders, if they provide the rename functionality at all, the file extension can have similar influence on the type of folder like it does for files (e.g. ".app", ".framework"), so just remove that restriction. Task-number: QTCREATORBUG-20057 Change-Id: I3802f17695da9d323d4d60c14ecef5c39aeef576 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -421,7 +421,7 @@ void ProjectTreeWidget::editCurrentItem()
|
|||||||
m_view->edit(currentIndex);
|
m_view->edit(currentIndex);
|
||||||
// Select complete file basename for renaming
|
// Select complete file basename for renaming
|
||||||
const Node *node = m_model->nodeForIndex(currentIndex);
|
const Node *node = m_model->nodeForIndex(currentIndex);
|
||||||
if (!node || node->nodeType() != NodeType::File)
|
if (!node)
|
||||||
return;
|
return;
|
||||||
QLineEdit *editor = qobject_cast<QLineEdit*>(m_view->indexWidget(currentIndex));
|
QLineEdit *editor = qobject_cast<QLineEdit*>(m_view->indexWidget(currentIndex));
|
||||||
if (!editor)
|
if (!editor)
|
||||||
|
|||||||
Reference in New Issue
Block a user