Profiler toolbar fixes + creating connections (#1677)

* Fixing button enabling, connection selection

* Fixing spacing
This commit is contained in:
Madeline MacDonald
2018-06-19 13:54:47 -07:00
committed by Karl Burtram
parent e69158d9b2
commit 6b018c5d06
3 changed files with 10 additions and 22 deletions

View File

@@ -202,8 +202,6 @@ export class ProfilerEditor extends BaseEditor {
this._register(attachSelectBoxStyler(this._sessionTemplateSelector, this.themeService));
this._actionBar.setContent([
{ action: this._connectAction },
{ element: Taskbar.createTaskbarSeparator() },
{ action: this._startAction },
{ action: this._stopAction },
{ element: dropdownContainer },
@@ -386,21 +384,20 @@ export class ProfilerEditor extends BaseEditor {
if (e.isConnected) {
this._connectAction.connected = this.input.state.isConnected;
this._startAction.enabled = this.input.state.isConnected;
this._stopAction.enabled = false;
this._pauseAction.enabled = false;
if (this.input.state.isConnected) {
this._sessionTemplateSelector.disable();
} else {
this._sessionTemplateSelector.enable();
this._startAction.enabled = this.input.state.isConnected;
this._stopAction.enabled = false;
this._pauseAction.enabled = false;
return;
}
return;
}
if (e.isPaused){
this._pauseAction.paused = this.input.state.isPaused;
this._pauseAction.enabled = !this.input.state.isStopped && (this.input.state.isRunning || this.input.state.isPaused);
}
if (e.isStopped || e.isRunning) {