Remove Mark Pen [skip ci]

master
huxingyi 2020-04-12 17:20:50 +09:30
parent a0911a69fd
commit 828a1a30ba
4 changed files with 15 additions and 14 deletions

View File

@ -182,9 +182,9 @@ DocumentWindow::DocumentWindow() :
selectButton->setToolTip(tr("Select node on canvas")); selectButton->setToolTip(tr("Select node on canvas"));
Theme::initAwesomeButton(selectButton); Theme::initAwesomeButton(selectButton);
QPushButton *markerButton = new QPushButton(QChar(fa::edit)); //QPushButton *markerButton = new QPushButton(QChar(fa::edit));
markerButton->setToolTip(tr("Marker pen")); //markerButton->setToolTip(tr("Marker pen"));
Theme::initAwesomeButton(markerButton); //Theme::initAwesomeButton(markerButton);
QPushButton *paintButton = new QPushButton(QChar(fa::paintbrush)); QPushButton *paintButton = new QPushButton(QChar(fa::paintbrush));
paintButton->setToolTip(tr("Paint brush")); paintButton->setToolTip(tr("Paint brush"));
@ -270,7 +270,7 @@ DocumentWindow::DocumentWindow() :
toolButtonLayout->addWidget(addButton); toolButtonLayout->addWidget(addButton);
toolButtonLayout->addWidget(selectButton); toolButtonLayout->addWidget(selectButton);
toolButtonLayout->addWidget(markerButton); //toolButtonLayout->addWidget(markerButton);
toolButtonLayout->addWidget(paintButton); toolButtonLayout->addWidget(paintButton);
//toolButtonLayout->addWidget(dragButton); //toolButtonLayout->addWidget(dragButton);
toolButtonLayout->addWidget(zoomInButton); toolButtonLayout->addWidget(zoomInButton);
@ -926,9 +926,9 @@ DocumentWindow::DocumentWindow() :
m_document->setEditMode(SkeletonDocumentEditMode::Select); m_document->setEditMode(SkeletonDocumentEditMode::Select);
}); });
connect(markerButton, &QPushButton::clicked, [=]() { //connect(markerButton, &QPushButton::clicked, [=]() {
m_document->setEditMode(SkeletonDocumentEditMode::Mark); // m_document->setEditMode(SkeletonDocumentEditMode::Mark);
}); //});
connect(paintButton, &QPushButton::clicked, [=]() { connect(paintButton, &QPushButton::clicked, [=]() {
m_document->setEditMode(SkeletonDocumentEditMode::Paint); m_document->setEditMode(SkeletonDocumentEditMode::Paint);

View File

@ -15,7 +15,7 @@ void initShortCuts(QWidget *widget, SkeletonGraphicsWidget *graphicsWidget)
defineKey(Qt::Key_Delete, &SkeletonGraphicsWidget::shortcutDelete); defineKey(Qt::Key_Delete, &SkeletonGraphicsWidget::shortcutDelete);
defineKey(Qt::Key_Backspace, &SkeletonGraphicsWidget::shortcutDelete); defineKey(Qt::Key_Backspace, &SkeletonGraphicsWidget::shortcutDelete);
defineKey(Qt::Key_A, &SkeletonGraphicsWidget::shortcutAddMode); defineKey(Qt::Key_A, &SkeletonGraphicsWidget::shortcutAddMode);
defineKey(Qt::Key_G, &SkeletonGraphicsWidget::shortcutMarkMode); //defineKey(Qt::Key_G, &SkeletonGraphicsWidget::shortcutMarkMode);
defineKey(Qt::CTRL + Qt::Key_A, &SkeletonGraphicsWidget::shortcutSelectAll); defineKey(Qt::CTRL + Qt::Key_A, &SkeletonGraphicsWidget::shortcutSelectAll);
defineKey(Qt::CTRL + Qt::Key_Z, &SkeletonGraphicsWidget::shortcutUndo); defineKey(Qt::CTRL + Qt::Key_Z, &SkeletonGraphicsWidget::shortcutUndo);
defineKey(Qt::CTRL + Qt::SHIFT + Qt::Key_Z, &SkeletonGraphicsWidget::shortcutRedo); defineKey(Qt::CTRL + Qt::SHIFT + Qt::Key_Z, &SkeletonGraphicsWidget::shortcutRedo);

View File

@ -142,7 +142,8 @@ void SkeletonGraphicsWidget::setBackgroundBlur(float turnaroundOpacity)
void SkeletonGraphicsWidget::shortcutEscape() void SkeletonGraphicsWidget::shortcutEscape()
{ {
if (SkeletonDocumentEditMode::Add == m_document->editMode || if (SkeletonDocumentEditMode::Add == m_document->editMode ||
SkeletonDocumentEditMode::Mark == m_document->editMode) { SkeletonDocumentEditMode::Mark == m_document->editMode ||
SkeletonDocumentEditMode::Paint == m_document->editMode) {
emit setEditMode(SkeletonDocumentEditMode::Select); emit setEditMode(SkeletonDocumentEditMode::Select);
return; return;
} }
@ -1821,10 +1822,10 @@ void SkeletonGraphicsWidget::shortcutAddMode()
} }
} }
void SkeletonGraphicsWidget::shortcutMarkMode() //void SkeletonGraphicsWidget::shortcutMarkMode()
{ //{
emit setEditMode(SkeletonDocumentEditMode::Mark); // emit setEditMode(SkeletonDocumentEditMode::Mark);
} //}
void SkeletonGraphicsWidget::shortcutUndo() void SkeletonGraphicsWidget::shortcutUndo()
{ {

View File

@ -618,7 +618,7 @@ public slots:
void setRotated(bool rotated); void setRotated(bool rotated);
void shortcutDelete(); void shortcutDelete();
void shortcutAddMode(); void shortcutAddMode();
void shortcutMarkMode(); //void shortcutMarkMode();
void shortcutUndo(); void shortcutUndo();
void shortcutRedo(); void shortcutRedo();
void shortcutXlock(); void shortcutXlock();