Compare commits
1 Commits
release-d2
...
32b154e99c
Author | SHA1 | Date | |
---|---|---|---|
32b154e99c |
@@ -1,9 +1,3 @@
|
|||||||
# d2025.07.0
|
|
||||||
|
|
||||||
* Add sub-command for exporting TileSheets as PNG files.
|
|
||||||
* Add 'Reload Project' menu item under File.
|
|
||||||
* Fix opening a project to mark an unopenable file as closed in the config file on startup.
|
|
||||||
|
|
||||||
# d2025.06.0
|
# d2025.06.0
|
||||||
|
|
||||||
* Add ability to remember recent projects in config
|
* Add ability to remember recent projects in config
|
||||||
|
@@ -64,13 +64,11 @@ class AssetContainer {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
constexpr void incRefs() const noexcept {
|
constexpr void incRefs() const noexcept {
|
||||||
oxAssert(m_references < ox::MaxValue<decltype(m_references)>, "reference count exceeds maximum");
|
|
||||||
++m_references;
|
++m_references;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr void decRefs() const noexcept {
|
constexpr void decRefs() const noexcept {
|
||||||
--m_references;
|
--m_references;
|
||||||
oxAssert(m_references >= 0, "negative references");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
@@ -164,7 +162,6 @@ template<typename T>
|
|||||||
constexpr AssetRef<T>::AssetRef(AssetContainer<T> const*c) noexcept: m_ctr(c) {
|
constexpr AssetRef<T>::AssetRef(AssetContainer<T> const*c) noexcept: m_ctr(c) {
|
||||||
if (m_ctr) {
|
if (m_ctr) {
|
||||||
m_ctr->updated.connect(this, &AssetRef::emitUpdated);
|
m_ctr->updated.connect(this, &AssetRef::emitUpdated);
|
||||||
m_ctr->incRefs();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,18 +8,13 @@ namespace studio {
|
|||||||
|
|
||||||
void navigateTo(Context &ctx, ox::StringParam filePath, ox::StringParam navArgs) noexcept {
|
void navigateTo(Context &ctx, ox::StringParam filePath, ox::StringParam navArgs) noexcept {
|
||||||
ox::String path = std::move(filePath);
|
ox::String path = std::move(filePath);
|
||||||
if (keel::isUuidUrl(path)) {
|
if (beginsWith(path, "uuid://")) {
|
||||||
auto const [p, err] = keel::uuidUrlToPath(keelCtx(ctx), path);
|
auto const [p, err] = keel::uuidUrlToPath(keelCtx(ctx), path);
|
||||||
if (err) {
|
if (err) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
path = p;
|
path = p;
|
||||||
}
|
}
|
||||||
//if (
|
|
||||||
// auto const [np, err] = ctx.navStack.back();
|
|
||||||
// !err && np->filePath == path && np->navArgs == navArgs.view()) {
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
ctx.navStack.resize(ctx.navIdx + 1);
|
ctx.navStack.resize(ctx.navIdx + 1);
|
||||||
ctx.navStack.emplace_back(ox::String{path}, ox::String{navArgs.view()});
|
ctx.navStack.emplace_back(ox::String{path}, ox::String{navArgs.view()});
|
||||||
try {
|
try {
|
||||||
@@ -54,9 +49,8 @@ void navigateBack(Context &ctx) noexcept {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void navigateForward(Context &ctx) noexcept {
|
void navigateForward(Context &ctx) noexcept {
|
||||||
auto const nextIdx = ctx.navIdx + 1;
|
while (ctx.navIdx < ctx.navStack.size()) {
|
||||||
while (nextIdx < ctx.navStack.size()) {
|
auto const &n = ctx.navStack[ctx.navIdx];
|
||||||
auto const &n = ctx.navStack[nextIdx];
|
|
||||||
try {
|
try {
|
||||||
ctx.navCallback(n.filePath, n.navArgs);
|
ctx.navCallback(n.filePath, n.navArgs);
|
||||||
} catch (std::exception const &e) {
|
} catch (std::exception const &e) {
|
||||||
@@ -64,7 +58,7 @@ void navigateForward(Context &ctx) noexcept {
|
|||||||
oxErrf("navigateForward failed: {}", e.what());
|
oxErrf("navigateForward failed: {}", e.what());
|
||||||
}
|
}
|
||||||
if (!ctx.project->exists(n.filePath)) {
|
if (!ctx.project->exists(n.filePath)) {
|
||||||
std::ignore = ctx.navStack.erase(nextIdx);
|
std::ignore = ctx.navStack.erase(ctx.navIdx);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
++ctx.navIdx;
|
++ctx.navIdx;
|
||||||
|
Reference in New Issue
Block a user