Merge pull request 'version 2.2.3' (#15) from graphic_fix into master

Reviewed-on: https://git.shs.tools/SHS/qad/pulls/15
This commit was merged in pull request #15.
This commit is contained in:
2021-06-09 18:07:17 +03:00
4 changed files with 64 additions and 64 deletions

View File

@@ -4,7 +4,7 @@ cmake_policy(SET CMP0072 NEW) # FindOpenGL prefers GLVND by default
project(qad)
set(qad_MAJOR 2)
set(qad_MINOR 2)
set(qad_REVISION 2)
set(qad_REVISION 3)
set(qad_SUFFIX )
set(qad_COMPANY SHS)
set(qad_DOMAIN org.SHS)

View File

@@ -1035,7 +1035,7 @@ void Graphic::drawAction() {
void Graphic::drawGrid() {
int gbx = gridborder.x(), gby = gridborder.y(), cwid = canvas->width(), chei = canvas->height();
double px, py, range, step, start;
int wid = cwid - gbx - 5, hei = chei - gby - 5, cx, cy, cnt;
int wid = cwid - gbx - 5, hei = chei - gby - 5, cx, cy, cnt, right = cwid + gbx;
QRect rect;
QPair<QString, QString> str;
@@ -1099,7 +1099,7 @@ void Graphic::drawGrid() {
if (axis_type_x == Graphic::Numeric) {
if (grad_x == Graphic::Auto) step = splitRange(range, wid / gridx / font_sz.width() * 1.4);
else step = gridx;
start = roundTo(canvas2realX(wid), step) + step;
start = roundTo(canvas2realX(right), step);
px = start + step;
if (step > 0.) {
cnt = 1000;
@@ -1107,7 +1107,7 @@ void Graphic::drawGrid() {
px -= step;
if (fabs(px) < step * .5) px = 0.;
cx = real2canvasX(px);
if (cx > cwid) continue;
if (cx > right) continue;
if (cx < gbx) break;
painter->setPen(grid_pen);
painter->drawLine(cx, hei + 5, cx, 0);
@@ -1126,7 +1126,7 @@ void Graphic::drawGrid() {
}
}
cx = real2canvasX(0.);
if (cx <= cwid && cx >= gbx) {
if (cx <= right && cx >= gbx) {
QPen _p(grid_pen);
_p.setStyle(Qt::SolidLine);
painter->setPen(_p);
@@ -1135,7 +1135,7 @@ void Graphic::drawGrid() {
} else {
int cur_scl[7] = {0,0,0,0,0,0,0};
step = splitRangeDate(range, wid / gridx / font_sz.width() * 1.4, &df, cur_scl);
start = roundTo(canvas2realX(wid), step) + step;
start = roundTo(canvas2realX(right), step);
px = start + step;
QDateTime cd = QDateTime::fromMSecsSinceEpoch(px * grid_numbers_x);
roundDateTime(cd, cur_scl);
@@ -1145,7 +1145,7 @@ void Graphic::drawGrid() {
while (cnt-- > 0) {
addDateTime(cd, cur_scl, -1);
cx = real2canvasX(cd.toMSecsSinceEpoch() / grid_numbers_x);
if (cx > cwid) continue;
if (cx > right) continue;
if (cx < gbx) break;
painter->setPen(grid_pen);
painter->drawLine(cx, hei + 5, cx, 0);

View File

@@ -8,7 +8,7 @@
int main(int argc, char * argv[]) {
PIINTROSPECTION_START
PIINTROSPECTION_START(piconnedit)
QApplication a(argc, argv);
enableHighDPI();
ConnectionEdit w;

View File

@@ -9,7 +9,7 @@ if (PIP_FOUND AND BUILDING_pip)
else()
set(APP_ICON "")
endif()
set(APP_INFO "PIConnection GUI editor")
set(APP_INFO "PIIntrospector")
include(PIPMacros)
set(PII_ROOT "${pip_ROOT_SRC}/libs/main/introspection")
pip_code_model(CCM "${PII_ROOT}/piintrospection_server_p.h" "${PII_ROOT}/piintrospection_threads_p.h" OPTIONS "-DPIP_EXPORT" "-Es" ABSOLUTE)