mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Bug fix: element text item move strange when element is rotated. (my apologies for this weird bug)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3399 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -36,7 +36,6 @@ DiagramContent::DiagramContent() {
|
||||
DiagramContent::DiagramContent(const DiagramContent &other) :
|
||||
elements(other.elements),
|
||||
textFields(other.textFields),
|
||||
elementTextFields(other.elementTextFields),
|
||||
images(other.images),
|
||||
shapes(other.shapes),
|
||||
conductorsToUpdate(other.conductorsToUpdate),
|
||||
@@ -74,7 +73,6 @@ QList<Conductor *> DiagramContent::conductors(int filter) const {
|
||||
void DiagramContent::clear() {
|
||||
elements.clear();
|
||||
textFields.clear();
|
||||
elementTextFields.clear();
|
||||
images.clear();
|
||||
shapes.clear();
|
||||
conductorsToUpdate.clear();
|
||||
@@ -92,7 +90,6 @@ QList<QGraphicsItem *> DiagramContent::items(int filter) const {
|
||||
|
||||
if (filter & Elements) foreach(QGraphicsItem *qgi, elements) items_list << qgi;
|
||||
if (filter & TextFields) foreach(QGraphicsItem *qgi, textFields) items_list << qgi;
|
||||
if (filter & ElementTextFields) foreach(QGraphicsItem *qgi, elementTextFields) items_list << qgi;
|
||||
if (filter & Images) foreach(QGraphicsItem *qgi, images) items_list << qgi;
|
||||
if (filter & Shapes) foreach(QGraphicsItem *qgi, shapes) items_list << qgi;
|
||||
|
||||
@@ -113,7 +110,6 @@ int DiagramContent::count(int filter) const {
|
||||
if (filter & SelectedOnly) {
|
||||
if (filter & Elements) foreach(Element *element, elements) { if (element -> isSelected()) ++ count; }
|
||||
if (filter & TextFields) foreach(DiagramTextItem *dti, textFields) { if (dti -> isSelected()) ++ count; }
|
||||
if (filter & ElementTextFields) foreach(DiagramTextItem *dti, elementTextFields) { if (dti -> isSelected()) ++ count; }
|
||||
if (filter & Images) foreach(DiagramImageItem *dii, images) { if (dii -> isSelected()) ++ count; }
|
||||
if (filter & Shapes) foreach(QetShapeItem *dsi, shapes) { if (dsi -> isSelected()) ++ count; }
|
||||
if (filter & ConductorsToMove) foreach(Conductor *conductor, conductorsToMove) { if (conductor -> isSelected()) ++ count; }
|
||||
@@ -123,7 +119,6 @@ int DiagramContent::count(int filter) const {
|
||||
else {
|
||||
if (filter & Elements) count += elements.count();
|
||||
if (filter & TextFields) count += textFields.count();
|
||||
if (filter & ElementTextFields) count += elementTextFields.count();
|
||||
if (filter & Images) count += images.count();
|
||||
if (filter & Shapes) count += shapes.count();
|
||||
if (filter & ConductorsToMove) count += conductorsToMove.count();
|
||||
@@ -142,7 +137,7 @@ int DiagramContent::count(int filter) const {
|
||||
QString DiagramContent::sentence(int filter) const {
|
||||
int elements_count = (filter & Elements) ? elements.count() : 0;
|
||||
int conductors_count = conductors(filter).count();
|
||||
int textfields_count = (filter & TextFields) ? (textFields.count() + elementTextFields.count()) : 0;
|
||||
int textfields_count = (filter & TextFields) ? (textFields.count()) : 0;
|
||||
int images_count = (filter & Images) ? images.count() : 0;
|
||||
int shapes_count = (filter & Shapes) ? shapes.count() : 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user