Squashed 'deps/nostalgia/' changes from 646ab128..ab11b885
ab11b885 [keel] Add missing new line to log message 36fc25fb [studio] Fix closing tab with unsaved changes 4803cca3 [nostalgia/player] Cleanup 6bd74611 [nostalgia] Update release notes c3f9cf9a [studio] Fix New Project opening project, disable New if no project open git-subtree-dir: deps/nostalgia git-subtree-split: ab11b885e680ee8f0be7ee06f2253ab7ddb726be
This commit is contained in:
@@ -68,7 +68,7 @@ constexpr auto makeLoader(Context &ctx) {
|
||||
if (!beginsWith(assetId, "/")) {
|
||||
auto const p = ctx.uuidToPath.at(assetId);
|
||||
if (p.error) {
|
||||
oxErrf("Could not find asset: {}", assetId);
|
||||
oxErrf("Could not find asset: {}\n", assetId);
|
||||
return ox::Error{1, "Asset ID not found"};
|
||||
}
|
||||
assetId = *p.value;
|
||||
|
@@ -156,7 +156,7 @@ void StudioUI::draw() noexcept {
|
||||
void StudioUI::drawMenu() noexcept {
|
||||
if (ImGui::BeginMainMenuBar()) {
|
||||
if (ImGui::BeginMenu("File")) {
|
||||
if (ImGui::MenuItem("New...", "Ctrl+N")) {
|
||||
if (ImGui::MenuItem("New...", "Ctrl+N", false, m_project)) {
|
||||
m_newMenu.open();
|
||||
}
|
||||
if (ImGui::MenuItem("New Project...", "Ctrl+Shift+N")) {
|
||||
@@ -254,6 +254,7 @@ void StudioUI::drawTabs() noexcept {
|
||||
if (!open) {
|
||||
if (e->unsavedChanges()) {
|
||||
m_closeFileConfirm.open();
|
||||
++it;
|
||||
} else {
|
||||
e->close();
|
||||
if (m_activeEditor == (*it).get()) {
|
||||
|
@@ -84,10 +84,11 @@ ox::FileSystem &Project::romFs() noexcept {
|
||||
}
|
||||
|
||||
ox::Error Project::mkdir(ox::StringViewCR path) const noexcept {
|
||||
auto const [stat, err] = m_fs.stat(path);
|
||||
auto [stat, err] = m_fs.stat(path);
|
||||
if (err) {
|
||||
OX_RETURN_ERROR(m_fs.mkdir(path, true));
|
||||
dirAdded.emit(path);
|
||||
OX_RETURN_ERROR(m_fs.stat(path).moveTo(stat));
|
||||
}
|
||||
return stat.fileType == ox::FileType::Directory ?
|
||||
ox::Error{} : ox::Error{1, "path exists as normal file"};
|
||||
|
Reference in New Issue
Block a user