Skip to content

Commit

Permalink
Fixed FLTK's recursive dependency.
Browse files Browse the repository at this point in the history
Added FLTK's new get_size_range() to resizeWindow().
  • Loading branch information
ggarra13 committed May 26, 2024
1 parent 29d29be commit 17400ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ endif()

add_subdirectory( tlRender/etc/SuperBuild )

set(FLTK_DEP tlRender )
set(FLTK_DEP )
if( BUILD_FLTK )
include( cmake/Modules/BuildFLTK.cmake )
endif()
Expand Down
6 changes: 3 additions & 3 deletions cmake/Modules/BuildFLTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ include( ExternalProject )
# The cutting EDGE!
#set( FLTK_GIT_TAG master )

#set(FLTK_GIT_TAG bc63ea7629c8c3c4248a777d1c0325ae800556e0) # latest stable.
set(FLTK_GIT_TAG 00dc35097b86f77d4aae7c789b03c70690f4b97f)
#set(FLTK_GIT_TAG 00dc35097b86f77d4aae7c789b03c70690f4b97f) # latest stable.
set(FLTK_GIT_TAG e325c2e4a0a927f0b70c7f71da02065019c020ef)

if(MRV2_PYFLTK OR FLTK_BUILD_SHARED)
# If we are building pyFLTK compile shared
Expand Down Expand Up @@ -54,7 +54,7 @@ ExternalProject_Add(
FLTK
GIT_REPOSITORY "https://github.com/fltk/fltk.git"
GIT_TAG ${FLTK_GIT_TAG}
DEPENDS ${FLTK_DEP}
DEPENDS tlRender
PATCH_COMMAND ${FLTK_PATCH}
CMAKE_ARGS
-DCMAKE_C_COMPILER=${FLTK_C_COMPILER}
Expand Down
8 changes: 6 additions & 2 deletions mrv2/lib/mrvGL/mrvTimelineViewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1517,15 +1517,19 @@ namespace mrv
<< " H=" << H << std::endl;
#endif

int minW = 690;
int minH = 602;
mw->get_size_range(&minW, &minH);

// Make sure that we are not less than the minimum window
// sizes, in case the user loaded a very tiny image.
if (W < 690)
if (W < minW)
{
p.frameView = true;
W = 690;
}

if (H < 602)
if (H < minH)
{
p.frameView = true;
H = 602;
Expand Down

0 comments on commit 17400ca

Please sign in to comment.