Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated copyright message
[modules/gui.git]
/
src
/
GraphicsView
/
GraphicsView_ViewPort.cxx
diff --git
a/src/GraphicsView/GraphicsView_ViewPort.cxx
b/src/GraphicsView/GraphicsView_ViewPort.cxx
index 4b3dafd5fc58e358995eb5757971ef61e8cc68c7..2d0cbc40c56871d6854f3ff3a1d947d0d391cade 100644
(file)
--- a/
src/GraphicsView/GraphicsView_ViewPort.cxx
+++ b/
src/GraphicsView/GraphicsView_ViewPort.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2013-20
16 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2013-20
23 CEA, EDF
, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-285,7
+285,7
@@
void GraphicsView_ViewPort::addItem( QGraphicsItem* theItem )
//================================================================
bool GraphicsView_ViewPort::isItemAdded( QGraphicsItem* theItem )
{
//================================================================
bool GraphicsView_ViewPort::isItemAdded( QGraphicsItem* theItem )
{
- if(
GraphicsView_Object* anObject =
dynamic_cast<GraphicsView_Object*>( theItem ) )
+ if( dynamic_cast<GraphicsView_Object*>( theItem ) )
{
for( GraphicsView_ObjectList::iterator anIter = myObjects.begin(); anIter != myObjects.end(); anIter++ )
if( theItem == *anIter )
{
for( GraphicsView_ObjectList::iterator anIter = myObjects.begin(); anIter != myObjects.end(); anIter++ )
if( theItem == *anIter )
@@
-480,11
+480,7
@@
bool GraphicsView_ViewPort::dumpViewToFormat(const QString& fileName, const QStr
return false;
QPrinter printer(QPrinter::ScreenResolution);
return false;
QPrinter printer(QPrinter::ScreenResolution);
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
- printer.setOutputFormat(QPrinter::PostScriptFormat);
-#else
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFormat(QPrinter::PdfFormat);
-#endif
printer.setOutputFileName(fileName);
QPainter painter;
if (!painter.begin(&printer))
printer.setOutputFileName(fileName);
QPainter painter;
if (!painter.begin(&printer))
@@
-1108,7
+1104,6
@@
void GraphicsView_ViewPort::highlight( double theX, double theY )
bool anIsHighlighted = false;
bool anIsOnObject = false;
bool anIsHighlighted = false;
bool anIsOnObject = false;
- GraphicsView_Object* aPreviousHighlightedObject = myHighlightedObject;
GraphicsView_Object* aHighlightedObject = 0;
QCursor aCursor;
GraphicsView_Object* aHighlightedObject = 0;
QCursor aCursor;
@@
-1259,7
+1254,6
@@
int GraphicsView_ViewPort::select( const QRectF& theRect, bool theIsAppend )
{
aStatus = GVSS_NoChanged;
{
aStatus = GVSS_NoChanged;
- bool updateAll = false;
if( !theIsAppend )
{
if( !mySelectedObjects.isEmpty() )
if( !theIsAppend )
{
if( !mySelectedObjects.isEmpty() )
@@
-1609,8
+1603,8
@@
void GraphicsView_ViewPort::dragObjects( QGraphicsSceneMouseEvent* e )
else
anObjectsToMove.append( anObject );
}
else
anObjectsToMove.append( anObject );
}
- else if( (
hasInteractionFlag( DraggingByMiddleButton ) && ( e->buttons() & Qt::MidButton
) ||
-
isDraggingSelectedByLeftButton() && ( e->buttons() & Qt::LeftButton
) ) &&
+ else if( (
( hasInteractionFlag( DraggingByMiddleButton ) && ( e->buttons() & Qt::MidButton )
) ||
+
( isDraggingSelectedByLeftButton() && ( e->buttons() & Qt::LeftButton )
) ) &&
nbSelected() )
{
for( initSelected(); moreSelected(); nextSelected() )
nbSelected() )
{
for( initSelected(); moreSelected(); nextSelected() )
@@
-1806,8
+1800,8
@@
void GraphicsView_ViewPort::onMouseEvent( QGraphicsSceneMouseEvent* e )
if( ( getHighlightedObject() &&
getHighlightedObject()->isMovable() &&
!( anAccel || e->button() != Qt::LeftButton ) ) ||
if( ( getHighlightedObject() &&
getHighlightedObject()->isMovable() &&
!( anAccel || e->button() != Qt::LeftButton ) ) ||
- ( (
hasInteractionFlag( DraggingByMiddleButton ) && e->button() == Qt::MidButton
||
-
isDraggingSelectedByLeftButton() && e->button() == Qt::LeftButton
) &&
+ ( (
( hasInteractionFlag( DraggingByMiddleButton ) && e->button() == Qt::MidButton )
||
+
( isDraggingSelectedByLeftButton() && e->button() == Qt::LeftButton )
) &&
nbSelected() && !anAccel ) )
{
myIsDragging = true;
nbSelected() && !anAccel ) )
{
myIsDragging = true;