Fix bug with rename vertex. Add postfix for graph with styles.

This commit is contained in:
Unick Soft
2019-09-08 16:22:11 +02:00
parent 1abf19abbf
commit c580c5aef9
2 changed files with 24 additions and 17 deletions

View File

@@ -937,7 +937,7 @@ Application.prototype.SaveGraphOnDisk = function ()
Application.prototype.SaveGraphImageOnDisk = function (showDialogCallback)
{
var imageName = this.GetNewGraphName();
var imageName = this.GetNewName();
this.stopRenderTimer();
this.redrawGraph();
@@ -978,7 +978,7 @@ Application.prototype.SaveGraphImageOnDisk = function (showDialogCallback)
Application.prototype.SaveFullGraphImageOnDisk = function (showDialogCallback, forPrint)
{
var imageName = this.GetNewGraphName();
var imageName = this.GetNewName();
this.stopRenderTimer();
var canvas = forPrint ? this._PrintRedrawGraph() : this._OffscreenRedrawGraph();
@@ -1038,6 +1038,19 @@ Application.prototype.LoadGraphFromDisk = function (graphName)
Application.prototype.GetNewGraphName = function()
{
var name = this.GetNewName();
if (this.isVertexCommonStyleCustom || this.isVertexSelectedVertexStylesCustom ||
this.isBackgroundCommonStyleCustom || this.isEdgeCommonStyleCustom || this.isEdgeSelectedStylesCustom)
{
name = name + "ZZcst";
}
return name;
}
Application.prototype.GetNewName = function()
{
var name = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";