mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
UI: fixed rare error with wrong dialog position after multiple popups (#4318);
This commit is contained in:
parent
14f90bfc77
commit
c58b28f94f
12 changed files with 185 additions and 173 deletions
|
|
@ -19,6 +19,7 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
|||
public static final String MAGE_VERSION_MINOR_PATCH = "V5"; // default
|
||||
// strict mode
|
||||
private static final boolean MAGE_VERSION_MINOR_PATCH_MUST_BE_SAME = true; // set true on uncompatible github changes, set false after new major release (after MAGE_VERSION_PATCH changes)
|
||||
public static final boolean MAGE_VERSION_SHOW_BUILD_TIME = true;
|
||||
|
||||
private final int major;
|
||||
private final int minor;
|
||||
|
|
@ -26,7 +27,6 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
|||
private final String minorPatch; // doesn't matter for compatibility
|
||||
private final String buildTime;
|
||||
private String editionInfo;
|
||||
private final boolean showBuildTime = true;
|
||||
|
||||
public MageVersion(Class sourceClass) {
|
||||
this(MAGE_VERSION_MAJOR, MAGE_VERSION_MINOR, MAGE_VERSION_PATCH, MAGE_VERSION_MINOR_PATCH, MAGE_EDITION_INFO, sourceClass);
|
||||
|
|
@ -40,7 +40,7 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
|||
this.editionInfo = editionInfo;
|
||||
|
||||
// build time
|
||||
this.buildTime = showBuildTime ? JarVersion.getBuildTime(sourceClass) : "";
|
||||
this.buildTime = JarVersion.getBuildTime(sourceClass);
|
||||
}
|
||||
|
||||
public int getMajor() {
|
||||
|
|
@ -59,10 +59,18 @@ public class MageVersion implements Serializable, Comparable<MageVersion> {
|
|||
return minorPatch;
|
||||
}
|
||||
|
||||
public String toString(boolean showBuildTime) {
|
||||
// 1.4.32-betaV0 (build: time)
|
||||
String res = major + "." + minor + '.' + patch + editionInfo + minorPatch;
|
||||
if (showBuildTime && !this.buildTime.isEmpty()) {
|
||||
res += " (build: " + this.buildTime + ")";
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
// 1.4.32-betaV0 (build: time)
|
||||
return major + "." + minor + '.' + patch + editionInfo + minorPatch + (!this.buildTime.isEmpty() ? " (build: " + this.buildTime + ")" : "");
|
||||
return toString(MAGE_VERSION_SHOW_BUILD_TIME);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue