fix warning at compil

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2545 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2013-09-17 20:48:15 +00:00
parent 8201daa564
commit eae024ebce

View File

@@ -426,14 +426,20 @@ void DiagramView::mousePressEvent(QMouseEvent *e) {
switchToVisualisationModeIfNeeded(e);
fresh_focus_in_ = false;
}
if (isInteractive() && !scene -> isReadOnly() && current_behavior > noAction && e -> buttons() == Qt::LeftButton) {
if (isInteractive() && !scene -> isReadOnly() && e -> buttons() == Qt::LeftButton) {
switch (current_behavior) {
case noAction:
break;
case addingText:
addDiagramTextAtPos(mapToScene(e -> pos()));
break;
case addingImage:
addDiagramImageAtPos(mapToScene(e -> pos()));
break;
case dragView:
break;
default:
break;
}
current_behavior = noAction;
}