diff --git a/QT/bezier_1/mywindow.cpp b/QT/bezier_1/mywindow.cpp index 5f6bbb9..bae52b6 100644 --- a/QT/bezier_1/mywindow.cpp +++ b/QT/bezier_1/mywindow.cpp @@ -126,12 +126,9 @@ void MyWindow::mousePressEvent(QMouseEvent *event) x -= poczX; y -= poczY; - startX = x; - startY = y; - -// active_img = img_tmp; - -// draw_finished = false; + if(x >= szer || y >= wys || x < 0 || y < 0){ + return; + } int id = -1; switch(event->button()){ @@ -176,13 +173,6 @@ void MyWindow::mouseMoveEvent(QMouseEvent *event) y -= poczY; if(x >= szer || y >= wys || x < 0 || y < 0){ -// ApplyTempImage(); - -// active_img = img; - -// draw_finished = true; - - return; } @@ -196,21 +186,11 @@ void MyWindow::mouseMoveEvent(QMouseEvent *event) } DrawBezier(); - // Odswiezamy komponent update(); } void MyWindow::mouseReleaseEvent(QMouseEvent *event){ - if(draw_finished) - return; - - ApplyTempImage(); - - active_img = img; - - draw_finished = true; - update(); } diff --git a/QT/bezier_1/mywindow.ui b/QT/bezier_1/mywindow.ui index 330ffca..27d61da 100644 --- a/QT/bezier_1/mywindow.ui +++ b/QT/bezier_1/mywindow.ui @@ -42,7 +42,7 @@ 630 10 241 - 271 + 331 @@ -121,12 +121,13 @@ 10 186 221 - 71 + 131 - Przytrzymaj lewy przycisk myszy by utworzyć okrąg. -Przytrzymaj prawy przycisk myszy by utworzyć elipse. + Naciśnij lewy przycisk myszy by utworzyć punkt. +Przytrzymaj lewy przycisk myszy przy punkcie by go przesunąć. +Naciśnij prawy przycisk myszy przy punkcie by go usunąć Qt::PlainText