Wednesday, November 29, 2023
Home3D ModelingOdd undo Challenge SketchUp 2023 – Works As Anticipated 2022 - Ruby...

Odd undo Challenge SketchUp 2023 – Works As Anticipated 2022 – Ruby API


Growing one other script I stumbled upon a problem that I had not beforehand seen concerning Undo.

The next script has severed me nicely since SketchUp 2021:

module PMC
	module AssignToTag

		lengthen self

		MENU ||= "Extensions"

		def assign_to_tag(assigned_tag)

			mannequin = Sketchup.active_model		
			mannequin.start_operation("Assigned to Tag: #{assigned_tag.identify}")
			mannequin.choice.every 
				t.layer = assigned_tag if t.layer!=assigned_tag
			
			mannequin.commit_operation

		finish

		if !outlined?(@ui_loaded)

			add_separator_to_menu(MENU)
			menu = UI.menu(MENU).add_submenu("Assign to Tag")

			Sketchup.active_model.layers.type.every { |tag|
				tagname = tag.identify
					if tagname == "Layer0"
						tagname = "Untagged"
					finish
				menu.add_item(tagname) { assign_to_tag(tag) }
			}

			@ui_loaded = true
			
		finish

	finish
finish

( the extension is particular to me and never meant for launch because it has limitations )

I assign keyboard shortcuts to a number of the Assign Tag instructions.

On start-up, in 2023 ctrl z doesn’t work until I’ve clicked wherever within the modelling area, or orbited or panned. After I’ve completed this, ctrl z works as anticipated each time I’ve assigned a tag through my extension.

Curiously, if as a substitute of doing ctrl z I am going to Edit>Undo…, Undo works as anticipated.

In 2022 I can invoke the keyboard Assign Tag shortcut after which carry out a ctrl z and the tag project is undone – each time together with for the primary time after start-up.

I’ve completed a Restore as administrator and the issue persists.

Curiously once more, in 2023 Alt+Backspace can be set as a shortcut for Undo in addition to ctrl z however I can’t delete it – whereas in 2022 I can delete Alt+Backspace.


From Google:
Is Alt Backspace is used for undo?

In most Microsoft Home windows purposes, the keyboard shortcut for the undo command is Ctrl+Z or Alt+Backspace, and the shortcut for redo is Ctrl+Y or Ctrl+Shift+Z.

Is the alt+backspace arduous wired?

That is bizarre.

In 2023, on start-up, if I do Alt+Backspace as Undo for the very first time an Undo happens however not with ctrl z.

How do you imply?

If I assign a tag utilizing Entity Data there isn’t a drawback in any respect utilizing ctrl z in 2023

I ponder if that is someway brought on by the rework of the GUI on SketchUp for Home windows to make use of Qt for 2023?

After a variety of repairs I made a decision to uninstall and re-install ( deleting SharedPreferences.json recordsdata in all my Roaming SketchUp folders in order that the brand new set up wouldn’t import earlier shortcuts ).

Drawback persists in 2023 and Alt+Backspace can’t be deleted like in 2022 ( despite the fact that it &%*@$ $%-ing comes again after restart ).

Properly, it’s trusty AutoHotkey to the rescue – assign ctrl z ( really z ) to Alt+Backspace.

Could possibly be the brand new Qt framework…?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments