diff --git a/data/en.mse-locale/locale b/data/en.mse-locale/locale index a6f895f3..880c4722 100644 --- a/data/en.mse-locale/locale +++ b/data/en.mse-locale/locale @@ -239,8 +239,7 @@ help: app language: Note: You must restart MSE for the changes to take effect. zoom export: - (When off, the cards are exported - and copied at 400% size and normal rotation) + (When off, the cards are exported at normal rotation) # apprentice export set code: A set code is a two character code that is used by Apprentice to refer to a set. @@ -614,13 +613,13 @@ button: high quality: &High quality rendering show lines: Show &lines around fields show editing hints: Show boxes and hints for &editing - zoom export: Use zoom and rotation settings when e&xporting + zoom export: Use Viewer rotation settings when e&xporting spellcheck enabled: Show &spelling errors on cards check now: Check &Now always: Always if internet connection exists: If internet connection exists never: Never - internal image extension: Store images internally with extension + internal image extension: Store images internally with file extension # Column select move up: Move &Up diff --git a/src/data/format/image.cpp b/src/data/format/image.cpp index 2a5e52ca..f901394c 100644 --- a/src/data/format/image.cpp +++ b/src/data/format/image.cpp @@ -34,8 +34,14 @@ private: Rotation UnzoomedDataViewer::getRotation() const { if (!stylesheet) stylesheet = set->stylesheet; - int export_zoom = settings.stylesheetSettingsFor(set->stylesheetFor(card)).export_zoom(); - return Rotation(angle, stylesheet->getCardRect(), export_zoom, 1.0, ROTATION_ATTACH_TOP_LEFT); + int export_zoom = settings.stylesheetSettingsFor(set->stylesheetFor(card)).export_zoom(); + bool use_viewer_rotation = !settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_normal_export(); + + if (use_viewer_rotation) { + return Rotation(DataViewer::getRotation().getAngle(), stylesheet->getCardRect(), export_zoom, 1.0, ROTATION_ATTACH_TOP_LEFT); + } else { + return Rotation(angle, stylesheet->getCardRect(), export_zoom, 1.0, ROTATION_ATTACH_TOP_LEFT); + } } Bitmap export_bitmap(const SetP& set, const CardP& card) { diff --git a/src/data/settings.cpp b/src/data/settings.cpp index 12aeebae..4a7eaf39 100644 --- a/src/data/settings.cpp +++ b/src/data/settings.cpp @@ -126,7 +126,8 @@ StyleSheetSettings::StyleSheetSettings() , card_angle (0, true) , card_anti_alias (true, true) , card_borders (true, true) - , card_draw_editing (true, true) + , card_draw_editing (true, true) + , card_normal_export (true, true) , card_spellcheck_enabled(true, true) {} @@ -136,7 +137,8 @@ void StyleSheetSettings::useDefault(const StyleSheetSettings& ss) { if (card_angle .isDefault()) card_angle .assignDefault(ss.card_angle); if (card_anti_alias .isDefault()) card_anti_alias .assignDefault(ss.card_anti_alias); if (card_borders .isDefault()) card_borders .assignDefault(ss.card_borders); - if (card_draw_editing .isDefault()) card_draw_editing .assignDefault(ss.card_draw_editing); + if (card_draw_editing .isDefault()) card_draw_editing .assignDefault(ss.card_draw_editing); + if (card_normal_export .isDefault()) card_normal_export .assignDefault(ss.card_normal_export); if (card_spellcheck_enabled.isDefault()) card_spellcheck_enabled.assignDefault(ss.card_spellcheck_enabled); } @@ -146,7 +148,8 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(StyleSheetSettings) { REFLECT(card_angle); REFLECT(card_anti_alias); REFLECT(card_borders); - REFLECT(card_draw_editing); + REFLECT(card_draw_editing); + REFLECT(card_normal_export); REFLECT(card_spellcheck_enabled); } diff --git a/src/gui/preferences_window.cpp b/src/gui/preferences_window.cpp index 6065e69d..6df0dae6 100644 --- a/src/gui/preferences_window.cpp +++ b/src/gui/preferences_window.cpp @@ -52,7 +52,7 @@ public: private: DECLARE_EVENT_TABLE(); - wxCheckBox* high_quality, *borders, *draw_editing, *spellcheck_enabled; + wxCheckBox* high_quality, *borders, *draw_editing, *spellcheck_enabled, *non_normal_export; wxComboBox* zoom; int zoom_int; @@ -213,15 +213,18 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent) high_quality = new wxCheckBox(this, wxID_ANY, _BUTTON_("high quality")); borders = new wxCheckBox(this, wxID_ANY, _BUTTON_("show lines")); draw_editing = new wxCheckBox(this, wxID_ANY, _BUTTON_("show editing hints")); - spellcheck_enabled = new wxCheckBox(this, wxID_ANY, _BUTTON_("spellcheck enabled")); + spellcheck_enabled = new wxCheckBox(this, wxID_ANY, _BUTTON_("spellcheck enabled")); + non_normal_export = new wxCheckBox(this, wxID_ANY, _BUTTON_("zoom export")); zoom = new wxComboBox(this, ID_ZOOM); - export_zoom = new wxComboBox(this, ID_EXPORT_ZOOM); + export_zoom = new wxComboBox(this, ID_EXPORT_ZOOM); + //wxButton* columns = new wxButton(this, ID_SELECT_COLUMNS, _BUTTON_("select")); // set values high_quality-> SetValue( settings.default_stylesheet_settings.card_anti_alias()); borders-> SetValue( settings.default_stylesheet_settings.card_borders()); draw_editing-> SetValue( settings.default_stylesheet_settings.card_draw_editing()); - spellcheck_enabled->SetValue( settings.default_stylesheet_settings.card_spellcheck_enabled()); + spellcheck_enabled->SetValue( settings.default_stylesheet_settings.card_spellcheck_enabled()); + non_normal_export->SetValue(!settings.default_stylesheet_settings.card_normal_export()); zoom_int = static_cast(settings.default_stylesheet_settings.card_zoom() * 100); zoom->SetValue(String::Format(_("%d%%"),zoom_int)); int choices[] = { 50,66,75,100,120,150,200 }; @@ -255,7 +258,8 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent) s4->Add(new wxStaticText(this, wxID_ANY, _LABEL_("percent of normal")), 1, wxALL & ~wxRIGHT, 4); s2->Add(s3, 0, wxEXPAND | wxALL, 4); - s2->Add(s4, 0, wxEXPAND | wxALL, 4); + s2->Add(s4, 0, wxEXPAND | wxALL, 4); + s2->Add(non_normal_export, 0, wxEXPAND | wxALL, 4); s->Add(s2, 0, wxEXPAND | wxALL, 8); @@ -267,7 +271,8 @@ void DisplayPreferencesPage::store() { settings.default_stylesheet_settings.card_anti_alias = high_quality->GetValue(); settings.default_stylesheet_settings.card_borders = borders->GetValue(); settings.default_stylesheet_settings.card_draw_editing = draw_editing->GetValue(); - settings.default_stylesheet_settings.card_spellcheck_enabled = spellcheck_enabled->GetValue(); + settings.default_stylesheet_settings.card_spellcheck_enabled = spellcheck_enabled->GetValue(); + settings.default_stylesheet_settings.card_normal_export = !non_normal_export->GetValue(); updateZoom(); settings.default_stylesheet_settings.card_zoom = zoom_int / 100.0;