Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
aardappel committed Jul 15, 2017
2 parents d4d0b24 + 5fca563 commit ce4abb9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Sample build with makefile generator
#
# cd <into-treesheets-source>
# cmake -H. -Bb -DCMAKE_BUILD_TYPE=Release \
# -DCMAKE_INSTALL_PREFIX=$PWD/i \
# -DCMAKE_PROGRAM_PATH=<path-to-wx-config> # not always needed
# cmake --build b --target install
#
# Sample build with IDE generator, like Xcode
#
# cd <into-treesheets-source>
# cmake -H. -Bb -GXcode \
# -DCMAKE_INSTALL_PREFIX=$PWD/i \
# -DCMAKE_PROGRAM_PATH=<path-to-wx-config> # not always needed
# cmake --build b --config Release --target install
#
# Run program:
#
# ./i/treesheets
#
# Should work on Windows, too. About helping FindwxWidgets to find wxWidgets
# consult: https://cmake.org/cmake/help/latest/module/FindwxWidgets.html

cmake_minimum_required(VERSION 3.1)
# CMAKE_CXX_STANDARD needs v3.1, could be lowered with minor effort

project(treesheets)

set(CMAKE_CXX_STANDARD 11)

find_package(wxWidgets REQUIRED aui adv core xml net)
include(${wxWidgets_USE_FILE})

file(GLOB sources src/*.cpp src/*.h)
add_executable(treesheets ${sources})

target_link_libraries(treesheets PRIVATE ${wxWidgets_LIBRARIES})

install(TARGETS treesheets DESTINATION .)
install(DIRECTORY TS/ DESTINATION .)
2 changes: 1 addition & 1 deletion src/mycanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct TSCanvas : public wxScrolledWindow {
// (scrolling) don't work.
// The 128 makes sure unicode entry on e.g. Polish keyboards still works.
// (on Linux in particular).
if (ce.AltDown() && ce.GetUnicodeKey() < 128) {
if ((ce.GetModifiers() == wxMOD_ALT) && (ce.GetUnicodeKey() < 128)) {
ce.Skip();
return;
}
Expand Down

0 comments on commit ce4abb9

Please sign in to comment.