mirror of
https://github.com/leozide/leocad.git
synced 2026-07-27 19:56:49 +00:00
Fixed ungroup action.
This commit is contained in:
+7
-4
@@ -2322,6 +2322,9 @@ void lcModel::UngroupSelection()
|
||||
|
||||
std::set<lcGroup*> SelectedGroups;
|
||||
|
||||
BeginActionSequence();
|
||||
BeginObjectEditAction();
|
||||
|
||||
for (const std::unique_ptr<lcPiece>& Piece : mPieces)
|
||||
{
|
||||
if (Piece->IsSelected())
|
||||
@@ -2343,15 +2346,15 @@ void lcModel::UngroupSelection()
|
||||
}
|
||||
}
|
||||
|
||||
if (!SelectedGroups.empty())
|
||||
if (SelectedGroups.empty())
|
||||
{
|
||||
DiscardActionSequence();
|
||||
|
||||
QMessageBox::information(gMainWindow, tr("Ungroup Selection"), tr("No groups selected."));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
BeginActionSequence();
|
||||
BeginObjectEditAction();
|
||||
|
||||
for (const std::unique_ptr<lcPiece>& Piece : mPieces)
|
||||
{
|
||||
lcGroup* Group = Piece->GetGroup();
|
||||
|
||||
Reference in New Issue
Block a user