Improve project name handling
This commit is contained in:
@@ -6,6 +6,7 @@ import arm.ui.UIView2D;
|
||||
import arm.ui.UIFiles;
|
||||
import arm.ui.UINodes;
|
||||
import arm.ui.UIToolbar;
|
||||
import arm.sys.Path;
|
||||
import arm.data.LayerSlot;
|
||||
import arm.node.MakeMaterial;
|
||||
|
||||
@@ -420,7 +421,8 @@ class History {
|
||||
}
|
||||
|
||||
static function push(name: String): TStep {
|
||||
kha.Window.get(0).title = UIFiles.filename + "* - ArmorPaint";
|
||||
var filename = Project.filepath == "" ? UIFiles.filename : Project.filepath.substring(Project.filepath.lastIndexOf(Path.sep) + 1, Project.filepath.length - 4);
|
||||
kha.Window.get(0).title = filename + "* - ArmorPaint";
|
||||
|
||||
if (undos < Config.raw.undo_steps) undos++;
|
||||
if (redos > 0) {
|
||||
|
||||
@@ -104,7 +104,8 @@ class Project {
|
||||
projectSaveAs();
|
||||
return;
|
||||
}
|
||||
Window.get(0).title = UIFiles.filename + " - ArmorPaint";
|
||||
var filename = Project.filepath.substring(Project.filepath.lastIndexOf(Path.sep) + 1, Project.filepath.length - 4);
|
||||
Window.get(0).title = filename + " - ArmorPaint";
|
||||
|
||||
function _init() {
|
||||
ExportArm.runProject();
|
||||
@@ -476,8 +477,7 @@ class Project {
|
||||
UIFiles.show("arm", true, function(path: String) {
|
||||
var f = UIFiles.filename;
|
||||
if (f == "") f = tr("untitled");
|
||||
filepath = path + Path.sep + f;
|
||||
ExportArm.runSwatches(filepath);
|
||||
ExportArm.runSwatches(path + Path.sep + f);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user