Switch files panel icon when there are missing files.
This commit is contained in:
parent
1d06bc0bce
commit
55ba530dc4
@ -148,6 +148,11 @@ OV.Navigator = class
|
||||
FillTree (importResult)
|
||||
{
|
||||
this.filesPanel.Fill (importResult);
|
||||
if (importResult.missingFiles.length === 0) {
|
||||
this.panelSet.SetPanelIcon (this.filesPanel, 'files');
|
||||
} else {
|
||||
this.panelSet.SetPanelIcon (this.filesPanel, 'missing_files');
|
||||
}
|
||||
this.materialsPanel.Fill (importResult);
|
||||
this.meshesPanel.Fill (importResult);
|
||||
this.OnSelectionChanged ();
|
||||
|
||||
@ -55,6 +55,7 @@ OV.PanelSet = class
|
||||
this.menuDiv = $('<div>').addClass ('ov_panel_set_menu').appendTo (parentDiv);
|
||||
this.contentDiv = $('<div>').addClass ('ov_panel_set_content').appendTo (parentDiv);
|
||||
this.panels = [];
|
||||
this.panelButtons = [];
|
||||
this.panelsVisible = true;
|
||||
this.panelsPrevWidth = null;
|
||||
this.callbacks = null;
|
||||
@ -74,6 +75,7 @@ OV.PanelSet = class
|
||||
{
|
||||
this.panels.push (panel);
|
||||
let button = OV.AddSvgIcon (this.menuDiv, panel.GetIcon (), 'ov_panel_set_menu_button');
|
||||
this.panelButtons.push (button);
|
||||
button.click (() => {
|
||||
if (panel === this.GetVisiblePanel ()) {
|
||||
this.ShowPanels (false);
|
||||
@ -133,6 +135,13 @@ OV.PanelSet = class
|
||||
return null;
|
||||
}
|
||||
|
||||
SetPanelIcon (panel, icon)
|
||||
{
|
||||
const panelIndex = this.panels.indexOf (panel);
|
||||
let panelButton = this.panelButtons[panelIndex];
|
||||
OV.SetSvgIconImage (panelButton, icon);
|
||||
}
|
||||
|
||||
Resize ()
|
||||
{
|
||||
let height = this.parentDiv.height ();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user