diff --git a/resources/forms/mainWindow.ui b/resources/forms/mainWindow.ui
index 6e4b8080..eaf78339 100644
--- a/resources/forms/mainWindow.ui
+++ b/resources/forms/mainWindow.ui
@@ -69,7 +69,6 @@
-
@@ -1561,25 +1560,6 @@
Ctrl+H
-
-
- true
-
-
- false
-
-
-
- :/images/toolbar/group.png
- :/images/toolbar/ungroup.png:/images/toolbar/group.png
-
-
- Group
-
-
- Group items
-
-
true
diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp
index 3868c791..ae78a5af 100644
--- a/src/board/UBBoardController.cpp
+++ b/src/board/UBBoardController.cpp
@@ -154,8 +154,6 @@ void UBBoardController::init()
setActiveDocumentScene(doc);
- connect(UBApplication::mainWindow->actionGroupItems, SIGNAL(triggered()), this, SLOT(groupButtonClicked()));
-
undoRedoStateChange(true);
}
@@ -978,35 +976,6 @@ void UBBoardController::lastScene()
updateActionStates();
}
-void UBBoardController::groupButtonClicked()
-{
- QAction *groupAction = UBApplication::mainWindow->actionGroupItems;
- QList selItems = activeScene()->selectedItems();
- if (!selItems.count()) {
- qDebug() << "Got grouping request when there is no any selected item on the scene";
- return;
- }
-
- if (groupAction->text() == mActionGroupText) { //The only way to get information from item, considering using smth else
- UBGraphicsGroupContainerItem *groupItem = activeScene()->createGroup(selItems);
- groupItem->setSelected(true);
- UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
-
- }
- else if (groupAction->text() == mActionUngroupText) {
- //Considering one selected item and it's a group
- if (selItems.count() > 1)
- {
- qDebug() << "can't make sense of ungrouping more then one item. Grouping action should be performed for that purpose";
- return;
- }
- UBGraphicsGroupContainerItem *currentGroup = dynamic_cast(selItems.first());
- if (currentGroup) {
- currentGroup->destroy();
- }
- }
-}
-
void UBBoardController::downloadURL(const QUrl& url, QString contentSourceUrl, const QPointF& pPos, const QSize& pSize, bool isBackground, bool internalData)
{
qDebug() << "something has been dropped on the board! Url is: " << url.toString();
diff --git a/src/board/UBBoardController.h b/src/board/UBBoardController.h
index 38a04b67..b346cb45 100644
--- a/src/board/UBBoardController.h
+++ b/src/board/UBBoardController.h
@@ -213,7 +213,6 @@ class UBBoardController : public UBDocumentContainer
void nextScene();
void firstScene();
void lastScene();
- void groupButtonClicked();
void downloadURL(const QUrl& url, QString contentSourceUrl = QString(), const QPointF& pPos = QPointF(0.0, 0.0), const QSize& pSize = QSize(), bool isBackground = false, bool internalData = false);
UBItem *downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl contentUrl, QString pHeader,
QByteArray pData, QPointF pPos, QSize pSize,
diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp
index b3c81afa..3bcdfb1a 100644
--- a/src/core/UBApplicationController.cpp
+++ b/src/core/UBApplicationController.cpp
@@ -383,7 +383,6 @@ void UBApplicationController::showBoard()
emit mainModeChanged(Board);
UBApplication::boardController->freezeW3CWidgets(false);
- UBApplication::boardController->activeScene()->updateGroupButtonState();
}
diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp
index ed3df20a..dc40829e 100644
--- a/src/domain/UBGraphicsScene.cpp
+++ b/src/domain/UBGraphicsScene.cpp
@@ -340,7 +340,6 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent, bool enableUndoRedoSta
// Just for debug. Do not delete please
// connect(this, SIGNAL(selectionChanged()), this, SLOT(selectionChangedProcessing()));
- connect(this, SIGNAL(selectionChanged()), this, SLOT(updateGroupButtonState()));
connect(UBApplication::undoStack.data(), SIGNAL(indexChanged(int)), this, SLOT(updateSelectionFrameWrapper(int)));
}
@@ -364,35 +363,6 @@ void UBGraphicsScene::selectionChangedProcessing()
}
}
-void UBGraphicsScene::updateGroupButtonState()
-{
-
- UBStylusTool::Enum currentTool = (UBStylusTool::Enum)UBDrawingController::drawingController()->stylusTool();
- if (UBStylusTool::Selector != currentTool && UBStylusTool::Play != currentTool)
- return;
-
- QAction *groupAction = UBApplication::mainWindow->actionGroupItems;
- QList selItems = selectedItems();
- int selCount = selItems.count();
-
- if (selCount < 1) {
- groupAction->setEnabled(false);
- groupAction->setText(UBApplication::app()->boardController->actionGroupText());
-
- } else if (selCount == 1) {
- if (selItems.first()->type() == UBGraphicsGroupContainerItem::Type) {
- groupAction->setEnabled(true);
- groupAction->setText(UBApplication::app()->boardController->actionUngroupText());
- } else {
- groupAction->setEnabled(false);
- }
-
- } else if (selCount > 1) {
- groupAction->setEnabled(true);
- groupAction->setText(UBApplication::app()->boardController->actionGroupText());
- }
-}
-
bool UBGraphicsScene::inputDevicePress(const QPointF& scenePos, const qreal& pressure)
{
bool accepted = false;
diff --git a/src/domain/UBGraphicsScene.h b/src/domain/UBGraphicsScene.h
index 01587316..7a59512c 100644
--- a/src/domain/UBGraphicsScene.h
+++ b/src/domain/UBGraphicsScene.h
@@ -340,7 +340,6 @@ public slots:
void setToolCursor(int tool);
void selectionChangedProcessing();
- void updateGroupButtonState();
void moveMagnifier();
void moveMagnifier(QPoint newPos, bool forceGrab = false);
void closeMagnifier();