mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
convert to CRLF line endings
This commit is contained in:
@@ -51,17 +51,17 @@ bool ImageValueEditor::onLeftDClick(const RealPoint&, wxMouseEvent&) {
|
||||
void ImageValueEditor::sliceImage(const Image& image, const String& filename, const String& cardname) {
|
||||
if (!image.Ok()) return;
|
||||
// determine import scale based on the user's settings.
|
||||
double import_scale = 1.0;
|
||||
StyleSheetP stylesheet = editor().getCard()->stylesheet;
|
||||
if (!stylesheet) stylesheet = editor().getSet()->stylesheet;
|
||||
if (stylesheet) import_scale = settings.importScaleSettingsFor(*stylesheet);
|
||||
RealSize target_size = RealSize(style().getSize() * import_scale);
|
||||
target_size = RealSize((int)target_size.width, (int)target_size.height);
|
||||
double import_scale = 1.0;
|
||||
StyleSheetP stylesheet = editor().getCard()->stylesheet;
|
||||
if (!stylesheet) stylesheet = editor().getSet()->stylesheet;
|
||||
if (stylesheet) import_scale = settings.importScaleSettingsFor(*stylesheet);
|
||||
RealSize target_size = RealSize(style().getSize() * import_scale);
|
||||
target_size = RealSize((int)target_size.width, (int)target_size.height);
|
||||
// mask
|
||||
GeneratedImage::Options options((int)target_size.width, (int)target_size.height, &parent.getStylePackage(), &parent.getLocalPackage());
|
||||
AlphaMask mask;
|
||||
style().mask.getNoCache(options, mask);
|
||||
// slice
|
||||
// slice
|
||||
ImageSliceWindow s(wxGetTopLevelParent(&editor()), image, filename, cardname, target_size, mask);
|
||||
// clicked ok?
|
||||
if (s.ShowModal() == wxID_OK) {
|
||||
|
||||
Reference in New Issue
Block a user