diff --git a/sources/editor/styleeditor.cpp b/sources/editor/styleeditor.cpp index 2d2ef8f06..6223f0071 100644 --- a/sources/editor/styleeditor.cpp +++ b/sources/editor/styleeditor.cpp @@ -67,7 +67,7 @@ StyleEditor::StyleEditor(QETElementEditor *editor, CustomElementGraphicPart *p, color_layout -> addWidget(black_color); color_layout -> addWidget(white_color); color_layout -> addStretch(); - main_layout -> addItem(color_layout); + main_layout -> addLayout(color_layout); QHBoxLayout *style_layout = new QHBoxLayout(); style_layout -> addWidget(new QLabel(tr("Style : "))); @@ -75,7 +75,7 @@ StyleEditor::StyleEditor(QETElementEditor *editor, CustomElementGraphicPart *p, style_layout -> addWidget(dashed_style); style_layout -> addWidget(dotted_style); style_layout -> addStretch(); - main_layout -> addItem(style_layout); + main_layout -> addLayout(style_layout); QHBoxLayout *weight_layout = new QHBoxLayout(); weight_layout -> addWidget(new QLabel(tr("\311paisseur : "))); @@ -83,7 +83,7 @@ StyleEditor::StyleEditor(QETElementEditor *editor, CustomElementGraphicPart *p, weight_layout -> addWidget(thin_weight); weight_layout -> addWidget(normal_weight); weight_layout -> addStretch(); - main_layout -> addItem(weight_layout); + main_layout -> addLayout(weight_layout); main_layout -> addWidget(new QLabel("" + tr("Remplissage :") + " ")); @@ -92,7 +92,7 @@ StyleEditor::StyleEditor(QETElementEditor *editor, CustomElementGraphicPart *p, filling_layout -> addWidget(black_filling); filling_layout -> addWidget(white_filling); filling_layout -> addStretch(); - main_layout -> addItem(filling_layout); + main_layout -> addLayout(filling_layout); main_layout -> addStretch(); diff --git a/sources/titleblock/templatelogomanager.cpp b/sources/titleblock/templatelogomanager.cpp index b0d27af24..9389dced6 100644 --- a/sources/titleblock/templatelogomanager.cpp +++ b/sources/titleblock/templatelogomanager.cpp @@ -79,7 +79,6 @@ void TitleBlockTemplateLogoManager::initWidgets() { logos_view_ -> setMinimumSize(iconsize() * 2.9); logos_view_ -> setIconSize(iconsize()); logos_view_ -> setWrapping(true); - logos_view_ -> setFlow(QListView::LeftToRight); logos_view_ -> setMovement(QListView::Static); logos_view_ -> setResizeMode(QListView::Adjust); add_button_ = new QPushButton(tr("Ajouter un logo")); diff --git a/sources/titleblock/templateview.cpp b/sources/titleblock/templateview.cpp index 744a89b24..3d347cad2 100644 --- a/sources/titleblock/templateview.cpp +++ b/sources/titleblock/templateview.cpp @@ -689,6 +689,8 @@ void TitleBlockTemplateView::loadTemplate(TitleBlockTemplate *tbt) { // assign the layout to a basic QGraphicsWidget form_ = new QGraphicsWidget(); + // enforce the layout direction to avoid reversing the template rendering + form_ -> setLayoutDirection(Qt::LeftToRight); form_ -> setLayout(tbgrid_); scene() -> addItem(form_); adjustSceneRect();