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;
|
x -= poczX;
|
||||||
y -= poczY;
|
y -= poczY;
|
||||||
|
|
||||||
startX = x;
|
if(x >= szer || y >= wys || x < 0 || y < 0){
|
||||||
startY = y;
|
return;
|
||||||
|
}
|
||||||
// active_img = img_tmp;
|
|
||||||
|
|
||||||
// draw_finished = false;
|
|
||||||
|
|
||||||
int id = -1;
|
int id = -1;
|
||||||
switch(event->button()){
|
switch(event->button()){
|
||||||
@ -176,13 +173,6 @@ void MyWindow::mouseMoveEvent(QMouseEvent *event)
|
|||||||
y -= poczY;
|
y -= poczY;
|
||||||
|
|
||||||
if(x >= szer || y >= wys || x < 0 || y < 0){
|
if(x >= szer || y >= wys || x < 0 || y < 0){
|
||||||
// ApplyTempImage();
|
|
||||||
|
|
||||||
// active_img = img;
|
|
||||||
|
|
||||||
// draw_finished = true;
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,21 +186,11 @@ void MyWindow::mouseMoveEvent(QMouseEvent *event)
|
|||||||
}
|
}
|
||||||
DrawBezier();
|
DrawBezier();
|
||||||
|
|
||||||
|
|
||||||
// Odswiezamy komponent
|
// Odswiezamy komponent
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyWindow::mouseReleaseEvent(QMouseEvent *event){
|
void MyWindow::mouseReleaseEvent(QMouseEvent *event){
|
||||||
if(draw_finished)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ApplyTempImage();
|
|
||||||
|
|
||||||
active_img = img;
|
|
||||||
|
|
||||||
draw_finished = true;
|
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
<x>630</x>
|
<x>630</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>241</width>
|
<width>241</width>
|
||||||
<height>271</height>
|
<height>331</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -121,12 +121,13 @@
|
|||||||
<x>10</x>
|
<x>10</x>
|
||||||
<y>186</y>
|
<y>186</y>
|
||||||
<width>221</width>
|
<width>221</width>
|
||||||
<height>71</height>
|
<height>131</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Przytrzymaj lewy przycisk myszy by utworzyć okrąg.
|
<string>Naciśnij lewy przycisk myszy by utworzyć punkt.
|
||||||
Przytrzymaj prawy przycisk myszy by utworzyć elipse.</string>
|
Przytrzymaj lewy przycisk myszy przy punkcie by go przesunąć.
|
||||||
|
Naciśnij prawy przycisk myszy przy punkcie by go usunąć</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::PlainText</enum>
|
<enum>Qt::PlainText</enum>
|
||||||
|
Loading…
Reference in New Issue
Block a user