Connector tools: UI doesn't update "Avoid state" and "Orthogonal connector" buttons when selecting an object

Migrated from: https://bugs.launchpad.net/inkscape/+bug/167451

Steps to reproduce:

  • open Inkscape
  • create a rectangle
  • open Connector tool -> note that "Connector ignores object" is not pressed
  • press "Connectors avoid object"
  • deselect rectangle
  • select rectangle again

What happened?

None of the two buttons is pressed

What should have happened?

The "Connectors avoid object" button is pressed.

One of the two buttons should always be pressed, except when nothing is selected or shapes with different "avoid states" are selected. -> Maybe make this a single button instead?

Also affects "Make orthogonal" toggle button.

  • Create a shape and create a connector, which is connected with the shape's center.
  • If you select the connector and press the "Make orthogonal" button, its state is displayed as pressed (good).
  • Select a shape -> still displayed as pressed (bad).
  • Create another connector (while button still displayed as pressed) -> Connector is created as a line, and is not orthogonal. (bad)

Inkscape Version and Operating System:

  • Inkscape Version: 1.1-dev (6b4d57f, 2020-04-01)
  • Operating System: Windows 10
  • Operating System version: 10.0.18362
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information