diff --git a/src/poseeditwidget.cpp b/src/poseeditwidget.cpp index 0617f3ed..d80f9e4c 100644 --- a/src/poseeditwidget.cpp +++ b/src/poseeditwidget.cpp @@ -347,9 +347,9 @@ void PoseEditWidget::save() if (m_poseId.isNull()) { emit addPose(m_nameEdit->text(), m_parameters); } else if (m_unsaved) { - m_unsaved = false; emit renamePose(m_poseId, m_nameEdit->text()); emit setPoseParameters(m_poseId, m_parameters); } + m_unsaved = false; close(); } diff --git a/src/poselistwidget.cpp b/src/poselistwidget.cpp index 39ef14b7..14cd2944 100644 --- a/src/poselistwidget.cpp +++ b/src/poselistwidget.cpp @@ -237,7 +237,7 @@ void PoseListWidget::reload() decltype(m_document->poseIdList.size()) poseIndex = 0; while (poseIndex < m_document->poseIdList.size()) { QTreeWidgetItem *item = new QTreeWidgetItem(this); - item->setFlags((item->flags() | Qt::ItemIsEditable | Qt::ItemIsEnabled) & ~(Qt::ItemIsSelectable)); + item->setFlags((item->flags() | Qt::ItemIsEnabled) & ~(Qt::ItemIsSelectable) & ~(Qt::ItemIsEditable)); for (int col = 0; col < columns && poseIndex < m_document->poseIdList.size(); col++, poseIndex++) { const auto &poseId = m_document->poseIdList[poseIndex]; item->setSizeHint(col, QSize(columnWidth, PoseWidget::preferredHeight() + 2)); diff --git a/src/skeletondocumentwindow.cpp b/src/skeletondocumentwindow.cpp index 2573ebe7..7a56ccc2 100644 --- a/src/skeletondocumentwindow.cpp +++ b/src/skeletondocumentwindow.cpp @@ -516,6 +516,13 @@ SkeletonDocumentWindow::SkeletonDocumentWindow() : }); m_windowMenu->addAction(m_showRigAction); + m_showPosesAction = new QAction(tr("Poses"), this); + connect(m_showPosesAction, &QAction::triggered, [=]() { + poseDocker->show(); + poseDocker->raise(); + }); + m_windowMenu->addAction(m_showPosesAction); + QMenu *dialogsMenu = m_windowMenu->addMenu(tr("Dialogs")); connect(dialogsMenu, &QMenu::aboutToShow, [=]() { dialogsMenu->clear(); diff --git a/src/skeletondocumentwindow.h b/src/skeletondocumentwindow.h index ce84740a..c89a977c 100644 --- a/src/skeletondocumentwindow.h +++ b/src/skeletondocumentwindow.h @@ -134,6 +134,7 @@ private: QAction *m_showPartsListAction; QAction *m_showDebugDialogAction; QAction *m_showRigAction; + QAction *m_showPosesAction; QMenu *m_helpMenu; QAction *m_viewSourceAction;