Bug report #4035

Print Composer shape combo box not refecting current shape

Added by Donkagen2 - almost 13 years ago. Updated over 12 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:-
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:14021

Description

Draw a new shape. The new shape is an ellipse and shows on the Item tab Shape combo box as Ellipse... as expected.
Click on the combo and select Rectangle - the shape changes to a rectangle but the combo still says Ellipse.
Select rectangle from the combo again and the combo then shows Rectangle.

It seems that the combo saves the current shape name rather than the new picked name.

shapeSelection.diff Magnifier (653 Bytes) Anna Kratochvilova, 2011-11-10 11:16 AM

History

#1 Updated by Nathan Woodrow almost 13 years ago

I can't seem to replicate this. Which version are you running.

#2 Updated by Anna Kratochvilova over 12 years ago

I can reproduce it in 1.7.1 on Ubuntu. The signal currentIndexChanged is connected to 2 slots. I tried to remove connection to setGuiElementValues. Instead, I added another connection between item and widget (similar to other composer items), although I'm not sure if it is necessary. See the patch.

#3 Updated by Giovanni Manghi over 12 years ago

  • Pull Request or Patch supplied set to Yes

Some can review and eventually commit this patch? thanks.

#4 Updated by Marco Hugentobler over 12 years ago

  • Status changed from Open to Resolved

Agreed, it's good to connect itemChanged() signal, because the widget stays in sync when using undo/redo functions. In future it will be good to emit more itemChanged() signals in the composer items. Like that, the widget stays in sync also if an item change comes from a python plugin.

#5 Updated by Alexander Bruy over 12 years ago

  • Resolution set to fixed
  • Status changed from Resolved to Closed

Seems fixed in 4b86c710e9

Also available in: Atom PDF