Fixed out of image bug, fixed manual
This commit is contained in:
parent
e2d234479e
commit
2328815a55
@ -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();
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
<x>630</x>
|
||||
<y>10</y>
|
||||
<width>241</width>
|
||||
<height>271</height>
|
||||
<height>331</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
@ -121,12 +121,13 @@
|
||||
<x>10</x>
|
||||
<y>186</y>
|
||||
<width>221</width>
|
||||
<height>71</height>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Przytrzymaj lewy przycisk myszy by utworzyć okrąg.
|
||||
Przytrzymaj prawy przycisk myszy by utworzyć elipse.</string>
|
||||
<string>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ąć</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
|
Loading…
Reference in New Issue
Block a user