issue 826 clear selection when adding an item to a group. changelog and list of contributor

--HG--
branch : feature
This commit is contained in:
Ronan Le Tiec 2018-04-02 11:52:42 +02:00
parent d3da522ac4
commit 84bab5386b
3 changed files with 8 additions and 4 deletions

View File

@ -48,6 +48,7 @@
- [#814] Make "\" valid character. - [#814] Make "\" valid character.
- [#818] Improve Piece path validation. Check uniqueness. - [#818] Improve Piece path validation. Check uniqueness.
- [#819] Use OpenGL as render for view. - [#819] Use OpenGL as render for view.
- [#826] New Feature. Add and remove items to groups from the context menu.
# Version 0.5.1 # Version 0.5.1
- [#683] Tool Seam allowance's dialog is off screen on small resolutions. - [#683] Tool Seam allowance's dialog is off screen on small resolutions.

View File

@ -10,7 +10,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>583</width> <width>583</width>
<height>526</height> <height>543</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -224,7 +224,8 @@ Fritz Rometsch
Felix Ulber Felix Ulber
Alex Zaharov Alex Zaharov
Valentina Zhuravska Valentina Zhuravska
Bettina Gatzlaff </string> Bettina Gatzlaff
Ronan Le Tiec</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -285,8 +285,11 @@ void VDrawTool::ContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 itemI
quint32 groupId = selectedAction->data().toUInt(); quint32 groupId = selectedAction->data().toUInt();
QDomElement item = doc->AddItemToGroup(this->getId(), itemId, groupId); QDomElement item = doc->AddItemToGroup(this->getId(), itemId, groupId);
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow()); VMainGraphicsScene *scene = qobject_cast<VMainGraphicsScene *>(qApp->getCurrentScene());
SCASSERT(scene != nullptr)
scene->clearSelection();
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr) SCASSERT(window != nullptr)
{ {
AddItemToGroup *addItemToGroup = new AddItemToGroup(item, doc, groupId); AddItemToGroup *addItemToGroup = new AddItemToGroup(item, doc, groupId);
@ -300,7 +303,6 @@ void VDrawTool::ContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 itemI
QDomElement item = doc->RemoveItemFromGroup(this->getId(), itemId, groupId); QDomElement item = doc->RemoveItemFromGroup(this->getId(), itemId, groupId);
VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow()); VAbstractMainWindow *window = qobject_cast<VAbstractMainWindow *>(qApp->getMainWindow());
SCASSERT(window != nullptr) SCASSERT(window != nullptr)
{ {
RemoveItemFromGroup *removeItemFromGroup = new RemoveItemFromGroup(item, doc, groupId); RemoveItemFromGroup *removeItemFromGroup = new RemoveItemFromGroup(item, doc, groupId);