Skip to content

Commit

Permalink
fix of bug introduced in commit 173e37f.
Browse files Browse the repository at this point in the history
avoid a reset of screen set to default at BlenderVR console opening,
thus remembering selected screenset at last console close.
  • Loading branch information
PyrApple committed Feb 14, 2016
1 parent c0ce6d7 commit 3bc022b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions modules/blendervr/console/qt/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,18 @@ def display_screen_sets(self, screenSets):
self._console_ui.current_screen_set.setText(currentScreenSet)

def cb_set_screen_set(self):
all_screen_sets = self._possibleScreenSets
current = all_screen_sets[
self._console_ui.select_screen_set.currentIndex()]
self.profile.setValue(['screen', 'set'], current)
self._console_ui.current_screen_set.setText(current)
self.set_screen_set()
if hasattr(self, '_first_time_cb_set_screen_set'):
# to avoid resetting screen set to default (first in list) at console opening,
# thus remembering selected screenset at last console close, related to the line in __init__:
# --> self._console_ui.select_screen_set.currentIndexChanged.connect(self.cb_set_screen_set)
all_screen_sets = self._possibleScreenSets
current = all_screen_sets[
self._console_ui.select_screen_set.currentIndex()]
self.profile.setValue(['screen', 'set'], current)
self._console_ui.current_screen_set.setText(current)
self.set_screen_set()
else:
self._first_time_cb_set_screen_set = True

def cb_set_blender_file(self):
previous_file = self.profile.getValue(['files', 'blender'])
Expand Down

0 comments on commit 3bc022b

Please sign in to comment.