sketchucation logo sketchucation
    • Login
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    One-shot toolbar button on Mac

    scheduled pinned locked moved SketchUp Bug Reporting
    sketchup
    1 Posts 1 Posters 946 Views 1 Watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • S Offline
      slbaumgartner
      last edited by

      The following code ought to create a toolbar button that acts once when clicked and then returns control to the previously active Tool. Instead, on Mac, the button toggles between "unpressed" and "pressed" each time it is clicked. Dan Rathbun says this works as expected on a PC.

      Tried this on SU 8 and SU 2013 with all other plugins disabled, with the toolbar floating, docked, and with the tool added to the top toolbar. Same results in all cases.

      
      tb=UI;;Toolbar.new "Test"
      cmd = UI;;Command.new("clickme") {puts "click!"}
      cmd.set_validation_proc { MF_UNCHECKED }
      tb.add_item cmd
      tb.show
      
      
      one-reply-to-this-post last-reply-time reply quote 0
      • 1 / 1
      • first-post
        last-post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement