Skip to content

Commit

Permalink
Fix default scroll lock state
Browse files Browse the repository at this point in the history
  • Loading branch information
morassman committed Mar 27, 2021
1 parent 3e677e1 commit f1f56f3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
8 changes: 8 additions & 0 deletions lib/views/main-view.js
Expand Up @@ -100,6 +100,10 @@ export default class MainView extends View {
}

showProcessOutput(processController) {
if (!processController.config.outputToPanel()) {
return
}

let tab = this.refs.tabsView.getConfigTab(processController.configController)

if (!tab) {
Expand Down Expand Up @@ -152,6 +156,10 @@ export default class MainView extends View {
processControllerRemoved(processController) {
const tab = this.refs.tabsView.getConfigTab(processController.configController)

if (!tab) {
return
}

const nextProcessController = processController.configController.getFirstProcessController();

// If there are no more left then remove the tab.
Expand Down
14 changes: 9 additions & 5 deletions lib/views/process-output-view.js
Expand Up @@ -23,8 +23,6 @@ export default class ProcessOutputView extends View {
this.lineIndex = 0;
this.patterns = this.processController.configController.patterns;

// this.addProcessDetails();
this.setScrollLockEnabled(this.processController.config.scrollLockEnabled);
this.initialize()
}

Expand Down Expand Up @@ -54,7 +52,13 @@ export default class ProcessOutputView extends View {
super.initialize()

this.addTooltips()
this.refreshScrollLockButton()

if (this.processController.config.scrollLockEnabled) {
this.setScrollLockEnabled(true)
} else {
this.refreshScrollLockButton()
}

this.processController.addProcessCallback(this)
this.outputChanged()
}
Expand Down Expand Up @@ -134,11 +138,11 @@ export default class ProcessOutputView extends View {
}

this.scrollLocked = enabled;
return this.refreshScrollLockButton();
this.refreshScrollLockButton();
}

showListView() {
return this.main.showListView();
this.main.showListView();
}

runButtonPressed() {
Expand Down

0 comments on commit f1f56f3

Please sign in to comment.