[qet] [4693] Bug Fix: correct Folio List folio display. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4693
Author: dfochi
Date: 2016-09-05 23:19:00 +0200 (Mon, 05 Sep 2016)
Log Message:
-----------
Bug Fix: correct Folio List folio display. Bug Fix: correct arrow key move behavior
Modified Paths:
--------------
trunk/sources/bordertitleblock.h
trunk/sources/diagram.cpp
trunk/sources/diagramfoliolist.cpp
trunk/sources/diagramview.cpp
Modified: trunk/sources/bordertitleblock.h
===================================================================
--- trunk/sources/bordertitleblock.h 2016-09-05 21:09:27 UTC (rev 4692)
+++ trunk/sources/bordertitleblock.h 2016-09-05 21:19:00 UTC (rev 4693)
@@ -95,6 +95,8 @@
QString title() const { return(btb_title_); }
/// @return the value of the title block "Folio" field
QString folio() const { return(btb_folio_); }
+ /// @return the value of the title block "Folio" field as displayed
+ QString finalfolio() const { return(btb_final_folio_); }
/// @return the value of the title block "Machine" field
QString machine() const { return(btb_machine_); }
/// @return the value of the title block "Locmach" field
Modified: trunk/sources/diagram.cpp
===================================================================
--- trunk/sources/diagram.cpp 2016-09-05 21:09:27 UTC (rev 4692)
+++ trunk/sources/diagram.cpp 2016-09-05 21:19:00 UTC (rev 4693)
@@ -251,7 +251,7 @@
if (!this->selectedContent().items(255).isEmpty()) {
switch(e -> key()) {
case Qt::Key_Left:
- foreach (QGraphicsItem *item, selected_elmts) {
+ foreach (Element *item, selectedContent().elements) {
left_position = item->mapRectFromScene(item->boundingRect()).x();
if (left_position >= this->sceneRect().left() - item->boundingRect().width())
return;
@@ -260,7 +260,7 @@
break;
case Qt::Key_Right: movement = QPointF(+xGrid, 0.0); break;
case Qt::Key_Up:
- foreach (QGraphicsItem *item, selected_elmts) {
+ foreach (Element *item, selectedContent().elements) {
top_position = item->mapRectFromScene(item->boundingRect()).y();
if (top_position >= this->sceneRect().top() - item->boundingRect().height())
return;
Modified: trunk/sources/diagramfoliolist.cpp
===================================================================
--- trunk/sources/diagramfoliolist.cpp 2016-09-05 21:09:27 UTC (rev 4692)
+++ trunk/sources/diagramfoliolist.cpp 2016-09-05 21:19:00 UTC (rev 4693)
@@ -92,7 +92,7 @@
if (settings.value("genericpanel/folio", true).toBool()){
fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(),
diagram_list[i] -> title(),
- diagram_list[i] -> border_and_titleblock.folio(),
+ diagram_list[i] -> border_and_titleblock.finalfolio(),
diagram_list[i] -> border_and_titleblock.machine(),
diagram_list[i] -> border_and_titleblock.locmach(),
diagram_list[i] -> border_and_titleblock.indexrev(),
Modified: trunk/sources/diagramview.cpp
===================================================================
--- trunk/sources/diagramview.cpp 2016-09-05 21:09:27 UTC (rev 4692)
+++ trunk/sources/diagramview.cpp 2016-09-05 21:19:00 UTC (rev 4693)
@@ -44,6 +44,7 @@
#include "dveventinterface.h"
#include "diagrameventaddelement.h"
#include "QPropertyUndoCommand/qpropertyundocommand.h"
+#include "qetshapeitem.h"
/**
Constructeur
@@ -683,6 +684,8 @@
QList<QGraphicsItem *> selected_elmts = scene->selectedContent().items(255);
QRectF viewed_scene = viewedSceneRect();
foreach (QGraphicsItem *qgi, selected_elmts){
+ if (qgraphicsitem_cast<Conductor *>(qgi)) continue;
+ if (qgraphicsitem_cast<QetShapeItem *>(qgi)) continue;
qreal x = qgi->pos().x();
qreal y = qgi->pos().y();
qreal bottom = viewed_scene.bottom();