mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
More warnings/minor fixes
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@836 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -328,7 +328,7 @@ void CombiningModeAction::perform(bool to_undo) {
|
||||
|
||||
SymbolPartNameAction::SymbolPartNameAction(const SymbolPartP& part, const String& name, size_t old_cursor, size_t new_cursor)
|
||||
: part(part), part_name(name)
|
||||
, new_cursor(old_cursor), old_cursor(new_cursor) // will be swapped
|
||||
, old_cursor(new_cursor), new_cursor(old_cursor) // will be swapped
|
||||
{}
|
||||
|
||||
String SymbolPartNameAction::getName(bool to_undo) const {
|
||||
|
||||
@@ -35,7 +35,7 @@ DECLARE_POINTER_TYPE(PackageChoiceValue);
|
||||
/// An Action the changes a Value
|
||||
class ValueAction : public Action {
|
||||
public:
|
||||
inline ValueAction(const Card* card, const ValueP& value) : card(card), valueP(value) {}
|
||||
inline ValueAction(const Card* card, const ValueP& value) : valueP(value), card(card) {}
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
|
||||
|
||||
+2
-2
@@ -161,11 +161,11 @@ int Style::update(Context& ctx) {
|
||||
if (automatic_side & AUTO_LEFT) left = right - width;
|
||||
else if (automatic_side & AUTO_WIDTH) width = right - left;
|
||||
else if (automatic_side & AUTO_RIGHT) right = left + width;
|
||||
else {int lr = left + right; left = (lr - width) / 2; right = (lr + width) / 2; }
|
||||
else {int lr = int(left + right); left = (lr - width) / 2; right = (lr + width) / 2; }
|
||||
if (automatic_side & AUTO_TOP) top = bottom - height;
|
||||
else if (automatic_side & AUTO_HEIGHT) height = bottom - top;
|
||||
else if (automatic_side & AUTO_BOTTOM) bottom = top + height;
|
||||
else {int tb = top + bottom; top = (tb - height) / 2; bottom = (tb + height) / 2; }
|
||||
else {int tb = int(top + bottom); top = (tb - height) / 2; bottom = (tb + height) / 2; }
|
||||
// adjust rotation point
|
||||
if (angle != 0 && (automatic_side & (AUTO_LEFT | AUTO_TOP))) {
|
||||
double s = sin(angle * M_PI / 180), c = cos(angle * M_PI / 180);
|
||||
|
||||
@@ -46,12 +46,13 @@ IMPLEMENT_REFLECTION(ChoiceField) {
|
||||
// ----------------------------------------------------------------------------- : ChoiceField::Choice
|
||||
|
||||
ChoiceField::Choice::Choice()
|
||||
: first_id(0)
|
||||
, line_below(false), enabled(true), type(CHOICE_TYPE_CHECK)
|
||||
: line_below(false), enabled(true), type(CHOICE_TYPE_CHECK)
|
||||
, first_id(0)
|
||||
{}
|
||||
ChoiceField::Choice::Choice(const String& name)
|
||||
: name(name), first_id(0)
|
||||
: name(name)
|
||||
, line_below(false), enabled(true), type(CHOICE_TYPE_CHECK)
|
||||
, first_id(0)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ wxFont Font::toWxFont(double scale) const {
|
||||
}
|
||||
} else if (name().empty()) {
|
||||
font = *wxNORMAL_FONT;
|
||||
font.SetPointSize(size > 1 ? size_i : scale * font.GetPointSize());
|
||||
font.SetPointSize(size > 1 ? size_i : int(scale * font.GetPointSize()));
|
||||
return font;
|
||||
} else if (flags & FONT_ITALIC && !italic_name().empty()) {
|
||||
font = wxFont(size_i, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, weight_i, underline(), italic_name());
|
||||
|
||||
@@ -38,7 +38,7 @@ IMPLEMENT_REFLECTION(Installer) {
|
||||
REFLECT(packages);
|
||||
}
|
||||
|
||||
/*
|
||||
#if 0
|
||||
// ----------------------------------------------------------------------------- : Installing
|
||||
|
||||
void Installer::installFrom(const String& filename, bool message_on_success, bool local) {
|
||||
@@ -135,12 +135,14 @@ void Installer::install(bool local, bool check_dependencies) {
|
||||
}
|
||||
os.Write(*is);
|
||||
}
|
||||
* /
|
||||
*/
|
||||
}
|
||||
|
||||
void Installer::install(const String& package) {
|
||||
// TODO
|
||||
}*/
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------- : Creating
|
||||
|
||||
@@ -255,14 +257,14 @@ DownloadableInstaller::~DownloadableInstaller() {
|
||||
InstallablePackage::InstallablePackage(const PackageVersionP& installed, const PackageDescriptionP& description)
|
||||
: installed(installed)
|
||||
, description(description)
|
||||
, action(PACKAGE_NOTHING)
|
||||
, status(PACKAGE_INSTALLED)
|
||||
, action(PACKAGE_NOTHING)
|
||||
{}
|
||||
InstallablePackage::InstallablePackage(const PackageDescriptionP& description , const DownloadableInstallerP& installer)
|
||||
: description(description)
|
||||
, installer(installer)
|
||||
, action(PACKAGE_NOTHING)
|
||||
, status(PACKAGE_INSTALLABLE)
|
||||
, action(PACKAGE_NOTHING)
|
||||
{}
|
||||
|
||||
void InstallablePackage::determineStatus() {
|
||||
|
||||
@@ -157,8 +157,8 @@ Settings::Settings()
|
||||
, installer_list_url (_("http://magicseteditor.sourceforge.net/installers"))
|
||||
, check_updates (CHECK_IF_CONNECTED)
|
||||
, check_updates_all (true)
|
||||
, install_type (INSTALL_DEFAULT)
|
||||
, website_url (_("http://magicseteditor.sourceforge.net/"))
|
||||
, install_type (INSTALL_DEFAULT)
|
||||
{}
|
||||
|
||||
void Settings::addRecentFile(const String& filename) {
|
||||
|
||||
Reference in New Issue
Block a user