[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/krita/tools
From: Melchior Franz <mfranz () kde ! org>
Date: 2005-04-16 17:59:00
Message-ID: 20050416175900.142823CA () office ! kde ! org
[Download RAW message or body]
CVS commit by mfranz:
allow Shift-resizing to other two quadrants
M +4 -2 kis_tool_ellipse.cc 1.39
M +4 -2 kis_tool_rectangle.cc 1.42
--- koffice/krita/tools/kis_tool_ellipse.cc #1.38:1.39
@@ -92,6 +92,8 @@ void KisToolEllipse::move(KisMoveEvent *
// circle?
if (event -> state() & Qt::ShiftButton) {
- double w = QMAX(diag.x(), diag.y());
- diag = KisPoint(w, w);
+ double size = QMAX(fabs(diag.x()), fabs(diag.y()));
+ double w = diag.x() < 0 ? -size : size;
+ double h = diag.y() < 0 ? -size : size;
+ diag = KisPoint(w, h);
}
--- koffice/krita/tools/kis_tool_rectangle.cc #1.41:1.42
@@ -92,6 +92,8 @@ void KisToolRectangle::move(KisMoveEvent
// square?
if (event -> state() & Qt::ShiftButton) {
- double w = QMAX(diag.x(), diag.y());
- diag = KisPoint(w, w);
+ double size = QMAX(fabs(diag.x()), fabs(diag.y()));
+ double w = diag.x() < 0 ? -size : size;
+ double h = diag.y() < 0 ? -size : size;
+ diag = KisPoint(w, h);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic