sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    One-shot toolbar button on Mac

    Scheduled Pinned Locked Moved SketchUp Bug Reporting
    sketchup
    1 Posts 1 Posters 930 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 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
      
      
      1 Reply Last reply 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