diff --git a/src/app/puzzle/vpcarrousel.cpp b/src/app/puzzle/vpcarrousel.cpp
index 072b3a528..87287c739 100644
--- a/src/app/puzzle/vpcarrousel.cpp
+++ b/src/app/puzzle/vpcarrousel.cpp
@@ -83,6 +83,15 @@ void VPCarrousel::Refresh()
RefreshOrientation();
}
+//---------------------------------------------------------------------------------------------------------------------
+void VPCarrousel::RefreshFocusedSheetName()
+{
+ // FIXME : This implementation will need a refactoring when we have multiple sheets, now it's not very nice!!
+
+ ui->comboBoxPieceList->setItemText(1, tr("Pieces of ") + m_layout->GetFocusedSheet()->GetName());
+}
+
+
//---------------------------------------------------------------------------------------------------------------------
void VPCarrousel::Clear()
{
diff --git a/src/app/puzzle/vpcarrousel.h b/src/app/puzzle/vpcarrousel.h
index 4a3119a0e..2fb31a61b 100644
--- a/src/app/puzzle/vpcarrousel.h
+++ b/src/app/puzzle/vpcarrousel.h
@@ -65,6 +65,11 @@ public:
*/
void Refresh();
+ /**
+ * @brief RefreshFocusedSheetName refreshes the name of the focused sheet
+ */
+ void RefreshFocusedSheetName();
+
/**
* @brief Clear Clears the carrousel (removes everything)
*/
diff --git a/src/app/puzzle/vpgraphicspiece.cpp b/src/app/puzzle/vpgraphicspiece.cpp
index eb0e4df4b..fda68e039 100644
--- a/src/app/puzzle/vpgraphicspiece.cpp
+++ b/src/app/puzzle/vpgraphicspiece.cpp
@@ -258,6 +258,12 @@ void VPGraphicsPiece::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
// TODO Detail & Piece Label
+// QPointF position = m_piece->GetPatternTextPosition();
+// QStringList texts = m_piece->GetPatternText();
+
+// painter->drawText();
+
+
// when using m_piece->GetItem(), the results were quite bad
diff --git a/src/app/puzzle/vpmainwindow.cpp b/src/app/puzzle/vpmainwindow.cpp
index 4f02469f2..6a6efa726 100644
--- a/src/app/puzzle/vpmainwindow.cpp
+++ b/src/app/puzzle/vpmainwindow.cpp
@@ -1041,6 +1041,17 @@ void VPMainWindow::on_comboBoxLayoutUnit_currentIndexChanged(int index)
SetPropertyTabTilesData();
}
+//---------------------------------------------------------------------------------------------------------------------
+void VPMainWindow::on_lineEditSheetName_textChanged(const QString &text)
+{
+ m_layout->GetFocusedSheet()->SetName(text);
+
+ if(m_carrousel != nullptr)
+ {
+ m_carrousel->RefreshFocusedSheetName();
+ }
+}
+
//---------------------------------------------------------------------------------------------------------------------
void VPMainWindow::on_comboBoxSheetTemplate_currentIndexChanged(int index)
{
diff --git a/src/app/puzzle/vpmainwindow.h b/src/app/puzzle/vpmainwindow.h
index 72287ecfa..aaf5bd0c0 100644
--- a/src/app/puzzle/vpmainwindow.h
+++ b/src/app/puzzle/vpmainwindow.h
@@ -285,6 +285,13 @@ private slots:
*/
void on_comboBoxLayoutUnit_currentIndexChanged(int index);
+ /**
+ * @brief on_lineEditSheetName_textChanged When the name of the sheet is changed
+ * in the sheet layout tab
+ * @param text
+ */
+ void on_lineEditSheetName_textChanged(const QString &text);
+
/**
* @brief on_comboBoxLayoutTemplate_currentIndexChanged When the template is
* changed in the sheet property tab.
diff --git a/src/app/puzzle/vpmainwindow.ui b/src/app/puzzle/vpmainwindow.ui
index 0951bd143..7d73aa8d2 100644
--- a/src/app/puzzle/vpmainwindow.ui
+++ b/src/app/puzzle/vpmainwindow.ui
@@ -176,7 +176,7 @@
QTabWidget::Rounded
- 2
+ 1