File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1169,17 +1169,25 @@ void QgsComposition::lockSelectedItems()
1169
1169
void QgsComposition::unlockAllItems ()
1170
1170
{
1171
1171
// unlock all items in composer
1172
+
1172
1173
QUndoCommand* parentCommand = new QUndoCommand ( tr ( " Items unlocked" ) );
1174
+
1175
+ // first, clear the selection
1176
+ clearSelection ();
1177
+
1173
1178
QList<QGraphicsItem *> itemList = items ();
1174
1179
QList<QGraphicsItem *>::iterator itemIt = itemList.begin ();
1175
1180
for ( ; itemIt != itemList.end (); ++itemIt )
1176
1181
{
1177
1182
QgsComposerItem* mypItem = dynamic_cast <QgsComposerItem *>( *itemIt );
1178
- if ( mypItem )
1183
+ if ( mypItem && mypItem-> positionLock () )
1179
1184
{
1180
1185
QgsComposerItemCommand* subcommand = new QgsComposerItemCommand ( mypItem, " " , parentCommand );
1181
1186
subcommand->savePreviousState ();
1182
1187
mypItem->setPositionLock ( false );
1188
+ // select unlocked items, same behaviour as illustrator
1189
+ mypItem->setSelected ( true );
1190
+ emit selectedItemChanged ( mypItem );
1183
1191
subcommand->saveAfterState ();
1184
1192
}
1185
1193
}
You can’t perform that action at this time.
0 commit comments