[nostalgia/core/studio] Replace ox::Error catch with ox::Exception catch
This commit is contained in:
parent
eb39c6aaf0
commit
5a52d322b2
@ -391,10 +391,6 @@ void TileSheetClipboard::addPixel(int color) {
|
|||||||
m_pixels.push_back(color);
|
m_pixels.push_back(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TileSheetClipboard::clear() {
|
|
||||||
m_pixels.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TileSheetClipboard::empty() const {
|
bool TileSheetClipboard::empty() const {
|
||||||
return m_pixels.empty();
|
return m_pixels.empty();
|
||||||
}
|
}
|
||||||
@ -591,7 +587,7 @@ void SheetData::setPalette(const studio::Context *ctx, QString palPath) {
|
|||||||
std::unique_ptr<NostalgiaPalette> npal;
|
std::unique_ptr<NostalgiaPalette> npal;
|
||||||
try {
|
try {
|
||||||
npal = ctx->project->loadObj<NostalgiaPalette>(palPath);
|
npal = ctx->project->loadObj<NostalgiaPalette>(palPath);
|
||||||
} catch (ox::Error) {
|
} catch (ox::Exception&) {
|
||||||
qWarning() << "Could not open palette" << palPath;
|
qWarning() << "Could not open palette" << palPath;
|
||||||
}
|
}
|
||||||
if (npal) {
|
if (npal) {
|
||||||
@ -895,7 +891,7 @@ void TileSheetEditor::exportFile() {
|
|||||||
std::unique_ptr<NostalgiaPalette> npal;
|
std::unique_ptr<NostalgiaPalette> npal;
|
||||||
try {
|
try {
|
||||||
npal = m_ctx->project->loadObj<NostalgiaPalette>(palPath);
|
npal = m_ctx->project->loadObj<NostalgiaPalette>(palPath);
|
||||||
} catch (ox::Error) {
|
} catch (ox::Exception&) {
|
||||||
qWarning() << "Could not open palette" << palPath;
|
qWarning() << "Could not open palette" << palPath;
|
||||||
// TODO: message box to notify of failure
|
// TODO: message box to notify of failure
|
||||||
}
|
}
|
||||||
|
@ -79,8 +79,6 @@ struct TileSheetClipboard {
|
|||||||
public:
|
public:
|
||||||
void addPixel(int color);
|
void addPixel(int color);
|
||||||
|
|
||||||
void clear();
|
|
||||||
|
|
||||||
[[nodiscard]] bool empty() const;
|
[[nodiscard]] bool empty() const;
|
||||||
|
|
||||||
void pastePixels(common::Point pt, QVector<int> *tgt, int tgtColumns) const;
|
void pastePixels(common::Point pt, QVector<int> *tgt, int tgtColumns) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user