Skip to content

Commit

Permalink
Add a menu item to force a new model, discarding current changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomthom committed May 19, 2017
1 parent 198c082 commit f931a22
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/retro_up/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,29 @@ module TT::Plugins::RetroUp
retro_menu.add_separator

id = retro_menu.add_item('Audio') { self.toggle_retro_mode }
retro_menu.set_validation_proc(id) { self.validation_proc_retro_mode }
retro_menu.set_validation_proc(id) { self.validation_proc_retro_mode }

id = retro_menu.add_item('Style') { self.toggle_retro_style_mode }
retro_menu.set_validation_proc(id) { self.validation_proc_retro_style_mode }
retro_menu.set_validation_proc(id) { self.validation_proc_retro_style_mode }

retro_menu.add_separator

id = retro_menu.add_item('Force New Model') { self.new_model_discard_changes }

retro_menu.add_separator

id = retro_menu.add_item('Debug') { self.toggle_debug_mode }
retro_menu.set_validation_proc(id) { self.validation_proc_debug_mode }
retro_menu.set_validation_proc(id) { self.validation_proc_debug_mode }

file_loaded(__FILE__)
end


def self.new_model_discard_changes
Sketchup.active_model.close(true)
end


def self.activate_all
self.retro_mode = true
self.retro_style_mode = true
Expand Down

0 comments on commit f931a22

Please sign in to comment.