mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-31 20:51:12 -06:00
ENH: [STUDIO-1185] jump to object in slice error notification
Change-Id: I0d8c3de78ac326f5ab0802fd301defaaac376bb6
This commit is contained in:
parent
0966655756
commit
b918052a97
8 changed files with 50 additions and 18 deletions
|
|
@ -24,7 +24,17 @@ SLIC3R_DERIVE_EXCEPTION(HostNetworkError, IOError);
|
|||
SLIC3R_DERIVE_EXCEPTION(ExportError, CriticalException);
|
||||
SLIC3R_DERIVE_EXCEPTION(PlaceholderParserError, RuntimeError);
|
||||
// Runtime exception produced by Slicer. Such exception cancels the slicing process and it shall be shown in notifications.
|
||||
SLIC3R_DERIVE_EXCEPTION(SlicingError, Exception);
|
||||
//SLIC3R_DERIVE_EXCEPTION(SlicingError, Exception);
|
||||
class SlicingError : public Exception
|
||||
{
|
||||
public:
|
||||
using Exception::Exception;
|
||||
SlicingError(std::string const &msg, size_t objectId) : Exception(msg), objectId_(objectId) {}
|
||||
size_t objectId() const { return objectId_; }
|
||||
|
||||
private:
|
||||
size_t objectId_ = 0;
|
||||
};
|
||||
#undef SLIC3R_DERIVE_EXCEPTION
|
||||
|
||||
} // namespace Slic3r
|
||||
|
|
|
|||
|
|
@ -677,8 +677,7 @@ std::vector<GCode::LayerToPrint> GCode::collect_layers_to_print(const PrintObjec
|
|||
// first layer may result in skirt/brim in the air and maybe other issues.
|
||||
if (layers_to_print.size() == 1u) {
|
||||
if (!has_extrusions)
|
||||
throw Slic3r::SlicingError(_(L("One object has empty initial layer and can't be printed. Please Cut the bottom or enable supports.")) + "\n" +
|
||||
_(L("Object")) + ": " + object.model_object()->name);
|
||||
throw Slic3r::SlicingError(_(L("One object has empty initial layer and can't be printed. Please Cut the bottom or enable supports.")), object.id().id);
|
||||
}
|
||||
|
||||
// In case there are extrusions on this layer, check there is a layer to lay it on.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue