fix bug with relative coordinates shown in preview window

This commit is contained in:
eddyem
2016-08-18 12:26:48 +03:00
parent c601c6ac10
commit f5ba8ad63e
7 changed files with 20 additions and 10 deletions

View File

@@ -29,8 +29,9 @@ aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} IMSOURCES)
find_package(PkgConfig REQUIRED)
find_package(OpenGL)
find_package(GLUT)
find_package(X11)
if(NOT GLUT_FOUND OR NOT OPENGL_FOUND)
if(NOT GLUT_FOUND OR NOT OPENGL_FOUND OR NOT X11_FOUND)
message("GLUT library not found, image view won't be available")
else()
# exe file
@@ -145,6 +146,6 @@ endif(NOT DEFINED STANDALONE)
target_link_libraries(${IMLIB} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} -lm -lpthread)
include_directories(${${IMLIB}_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} ..)
link_directories(${${IMLIB}_LIBRARY_DIRS})
endif(NOT GLUT_FOUND OR NOT OPENGL_FOUND)
endif(NOT GLUT_FOUND OR NOT OPENGL_FOUND OR NOT X11_FOUND)

View File

@@ -94,7 +94,10 @@ void mousePressed(_U_ int key, _U_ int state, _U_ int x, _U_ int y){
if(RA > 4e6){
printf("\n");
WARNX(_("Give WCS parameters, at least ROT0, CRPIX1 and CRPIX2"));
}else printf(", ra = %s, dec=%s\n", angle_asc(RA), time_asc(D));
}else{
printf(", ra = %s", angle_asc(RA));
printf(", dec=%s\n", time_asc(D));
}
if(key == GLUT_MIDDLE_BUTTON) movingwin = 1;
if(key == 3){ // wheel UP
if(mod == 0) win->y += 10.*win->zoom; // nothing pressed - scroll up