Skip to content

Commit

Permalink
fixed an issue related to #1204
Browse files Browse the repository at this point in the history
  • Loading branch information
eirannejad committed Mar 27, 2021
1 parent 0ee0cb3 commit 2e8d00f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -871,8 +871,11 @@ def _save_uiux(self):

# output settings
output.set_stylesheet(self.cur_stylesheet_tb.Text)
if self.cur_stylesheet_tb.Text != output.get_default_stylesheet():
default_stylesheet = output.get_default_stylesheet()
if self.cur_stylesheet_tb.Text != default_stylesheet:
user_config.output_stylesheet = self.cur_stylesheet_tb.Text
elif user_config.output_stylesheet != default_stylesheet:
user_config.output_stylesheet = None
# pyrevit gui settings
if self.loadtooltipex_cb.IsChecked != user_config.tooltip_debug_info \
and not self.reload_requested:
Expand Down
11 changes: 7 additions & 4 deletions pyrevitlib/pyrevit/userconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,13 @@ def output_stylesheet(self):

@output_stylesheet.setter
def output_stylesheet(self, stylesheet_filepath):
self.core.set_option(
CONSTS.ConfigsOutputStyleSheet,
value=stylesheet_filepath
)
if stylesheet_filepath:
self.core.set_option(
CONSTS.ConfigsOutputStyleSheet,
value=stylesheet_filepath
)
else:
self.core.remove_option(CONSTS.ConfigsOutputStyleSheet)

@property
def routes_host(self):
Expand Down

0 comments on commit 2e8d00f

Please sign in to comment.