diff --git a/NEWS.md b/NEWS.md index cef7175a..8a73d459 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +Red Panda C++ Version 1.0.9 + - fix: selection in column mode not correctly drawn when has wide chars in it + - fix: delete & insert in column mode not correctly handled + - fix: input with ime in column mode not correctly handled + - fix: copy & paste in column mode not correctly handled + - fix: crash when project name is selected in the project view and try create new project file + Red Panda C++ Version 1.0.8 - enhancement: auto complete '#undef' - enhancement: redesign components for compiler commandline arguments processing @@ -9,11 +16,6 @@ Red Panda C++ Version 1.0.8 - enhancement: adjust scheme colors for "dark" and "high contrast" themes - enhancement: can debug files that has non-ascii chars in its path and is compiled by clang - fix: when debugging project, default compiler set is wrongly used - - fix: selection in column mode not correctly drawn when has wide chars in it - - fix: delete & insert in column mode not correctly handled - - fix: input with ime in column mode not correctly handled - - fix: copy & paste in column mode not correctly handled - Red Panda C++ Version 1.0.7 - change: use Shift+Enter to break line diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 7afa864a..581fe9da 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -10,7 +10,7 @@ isEmpty(APP_NAME) { } isEmpty(APP_VERSION) { - APP_VERSION=1.0.8 + APP_VERSION=1.0.9 } diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 73a1dd01..798898f1 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -6029,22 +6029,32 @@ void MainWindow::newProjectUnitFile() while (modelTypeNode && modelTypeNode->folderNodeType==ProjectSpecialFolderNode::NonSpecial) { modelTypeNode=modelTypeNode->parent.lock(); } + if (!modelTypeNode) { + modelTypeNode = mProject->rootNode(); + } NewProjectUnitDialog newProjectUnitDialog; - switch (modelTypeNode->folderNodeType) { - case ProjectSpecialFolderNode::HEADERS: - newProjectUnitDialog.setSuffix("h"); - break; - case ProjectSpecialFolderNode::SOURCES: + if (modelTypeNode == mProject->rootNode()) { if (mProject->options().isCpp) newProjectUnitDialog.setSuffix("cpp"); else newProjectUnitDialog.setSuffix("c"); - break; - default: - newProjectUnitDialog.setSuffix(""); + } else { + switch (modelTypeNode->folderNodeType) { + case ProjectSpecialFolderNode::HEADERS: + newProjectUnitDialog.setSuffix("h"); + break; + case ProjectSpecialFolderNode::SOURCES: + if (mProject->options().isCpp) + newProjectUnitDialog.setSuffix("cpp"); + else + newProjectUnitDialog.setSuffix("c"); + break; + default: + newProjectUnitDialog.setSuffix(""); + } } QString folder = mProject->fileSystemNodeFolderPath(pNode); - qDebug()<folderNodeType == ProjectSpecialFolderNode::NonSpecial) { - result = node->text + "/" +result; - pNode = pNode->parent.lock(); + if (node != mRootNode) { + PProjectModelNode pNode = node; + while (pNode && pNode->folderNodeType == ProjectSpecialFolderNode::NonSpecial) { + result = node->text + "/" +result; + pNode = pNode->parent.lock(); + } } result = folder() + "/" + result; return result; diff --git a/Red_Panda_CPP.pro b/Red_Panda_CPP.pro index b27d7261..01797353 100644 --- a/Red_Panda_CPP.pro +++ b/Red_Panda_CPP.pro @@ -17,7 +17,7 @@ SUBDIRS += \ APP_NAME = RedPandaCPP -APP_VERSION = 1.0.8 +APP_VERSION = 1.0.9 linux: {